Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2024 16:20:01 GMT
From:      Doug Moore <dougm@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6aede562b438 - main - vm_phys: hide alloc_freelist_pages
Message-ID:  <202409051620.485GK1rL023806@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dougm:

URL: https://cgit.FreeBSD.org/src/commit/?id=6aede562b438ad9be7197f04307d8bc58d43e6ee

commit 6aede562b438ad9be7197f04307d8bc58d43e6ee
Author:     Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2024-09-05 16:17:53 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409051620.485GK1rL023806>