From nobody Thu Sep 05 16:20:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X04MP2xTWz5WKgn; Thu, 05 Sep 2024 16:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X04MP2LLcz4qsL; Thu, 5 Sep 2024 16:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725553201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0i/wyElIkSRJi6fan8caZHx/EXJhgRpbS7WgxOsAyFU=; b=fCzcnB3VVrwxXOATjlIuPWF6tCgvVnbp2FOvAjQA2TssYLg9fZt+uI3j+P+aG2wEnrgCJO K6DtckiJnsPwWpOP98+bdnNb8pjVbUxz12cnJ6hZOSwDmLWq/nEsdHdb1/oxVL9YHEFM3B dB4IcWZIRqJp7R00v8cPKjsLOaN4rRUUFxjZRNxoMYSUL5xcQ8ib6B/27fWGUODKY9RyVN IBonjyDRalVJXACd+rAVvETc+cfa7t//cXrvAZHZWrtwBUal3NCiVwio5xIqWlsPePxy4W fJDkYg+hy7qgllsUkP/dSG8cSz18CPxIS3G+nhJwUzHi2GPYA+V/KUZ6hn1b1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725553201; a=rsa-sha256; cv=none; b=drrAgMhF1l1eQhOPJTxP2hGRt3zKeYLpb31h6qzRKM5XVBg9RM35ZcJlzXhetinC6kJVzo ZFvS/kjrEfMG3lXRXqZBoPRhCwJvt7ZH6/a9evwgp/ueE1UvkdyWdeQbxLpi2bowQOGJJA 4j2a33IIFDz6cFQKoI0fZvOybsPw3NTGLu0RHKS52kllp+gE0AElbCRJZBytiXKGSL42wq WSaJ0Zq6gfR4YuGvSJSJcsNmnbLdlrRE/pjK4FBvtsIDBVnzv0QIIOxje2oCYQQg6oAfYw 11PB2b/CzyZ5NGmYUQCrb0lKmIRF9QPh7pku9U8vCrNVGYC7UwWfDfYFSgYRgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725553201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0i/wyElIkSRJi6fan8caZHx/EXJhgRpbS7WgxOsAyFU=; b=Hhg+JOf59G8FjahSunj5e05PkLXjBi/JEjzoGTWxYotsbmefw6XZqm2/MFLauPByavLCb7 RCsr8MlAPZBOVTqjqvmRyEoozAhIkqSr/+F3t3cEIQVVtYdqBBq16oCjrleZaEsPMqdH8Y W06Gb1FIxZ62mx0Z5WiRJxSMf/8XkSCDG/sKd3Rh7tI0Ew9D8r+/X8ECvsmvpw7J92xv7X U5WEsSIu+BF2/+Tqm+eEVQCo4KYLVLOE2dUQqHtYWJJUYXXBbBUIp+mfc5ReeidUMIBCnk q+XE8O8ayVG5fcPg8+N8KRle1IYXBppPe6vElsyv4SpZRDj961PTjC0/h602Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X04MP1QCWzFvS; Thu, 5 Sep 2024 16:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 485GK1Yi023809; Thu, 5 Sep 2024 16:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 485GK1rL023806; Thu, 5 Sep 2024 16:20:01 GMT (envelope-from git) Date: Thu, 5 Sep 2024 16:20:01 GMT Message-Id: <202409051620.485GK1rL023806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 6aede562b438 - main - vm_phys: hide alloc_freelist_pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6aede562b438ad9be7197f04307d8bc58d43e6ee Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=6aede562b438ad9be7197f04307d8bc58d43e6ee commit 6aede562b438ad9be7197f04307d8bc58d43e6ee Author: Doug Moore AuthorDate: 2024-09-05 16:17:53 +0000 Commit: Doug Moore CommitDate: 2024-09-05 16:17:53 +0000 vm_phys: hide alloc_freelist_pages Make vm_phys_alloc_freelist_pages static. There are no longer any callers outside of vm_phys.c. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D46539 --- sys/vm/vm_phys.c | 42 +++++++++++++++++++++--------------------- sys/vm/vm_phys.h | 2 -- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 59ab7d13c55d..cf1ed5818b2f 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -903,26 +903,6 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) return (i); } -/* - * Allocate a contiguous, power of two-sized set of physical pages - * from the free lists. - * - * The free page queues must be locked. - */ -vm_page_t -vm_phys_alloc_pages(int domain, int pool, int order) -{ - vm_page_t m; - int freelist; - - for (freelist = 0; freelist < VM_NFREELIST; freelist++) { - m = vm_phys_alloc_freelist_pages(domain, freelist, pool, order); - if (m != NULL) - return (m); - } - return (NULL); -} - /* * Allocate a contiguous, power of two-sized set of physical pages from the * specified free list. The free list must be specified using one of the @@ -930,7 +910,7 @@ vm_phys_alloc_pages(int domain, int pool, int order) * * The free page queues must be locked. */ -vm_page_t +static vm_page_t vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, int order) { struct vm_freelist *alt, *fl; @@ -987,6 +967,26 @@ vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, int order) return (NULL); } +/* + * Allocate a contiguous, power of two-sized set of physical pages + * from the free lists. + * + * The free page queues must be locked. + */ +vm_page_t +vm_phys_alloc_pages(int domain, int pool, int order) +{ + vm_page_t m; + int freelist; + + for (freelist = 0; freelist < VM_NFREELIST; freelist++) { + m = vm_phys_alloc_freelist_pages(domain, freelist, pool, order); + if (m != NULL) + return (m); + } + return (NULL); +} + /* * Find the vm_page corresponding to the given physical address, which must lie * within the given physical memory segment. diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index bd086fd5571f..43d94a9420f2 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -61,8 +61,6 @@ extern int *mem_locality; void vm_phys_add_seg(vm_paddr_t start, vm_paddr_t end); vm_page_t vm_phys_alloc_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary); -vm_page_t vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, - int order); int vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]); vm_page_t vm_phys_alloc_pages(int domain, int pool, int order); int vm_phys_domain_match(int prefer, vm_paddr_t low, vm_paddr_t high);