diff options
author | alc <alc@FreeBSD.org> | 2011-10-30 05:06:14 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2011-10-30 05:06:14 +0000 |
commit | 57e87053968d82083a0358efdc54fd5831e2b3e4 (patch) | |
tree | c68c62addf3e0c34caba615d9beb3884e1aa3b90 /sys/vm/vm_phys.h | |
parent | 8e54cbf4ab0561fda32fb114b684a2ddf1c1d8f8 (diff) | |
download | FreeBSD-src-57e87053968d82083a0358efdc54fd5831e2b3e4.zip FreeBSD-src-57e87053968d82083a0358efdc54fd5831e2b3e4.tar.gz |
Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at
eliminating duplicated code in the various pmap implementations.
Micro-optimize vm_phys_free_pages().
Introduce vm_phys_free_contig(). It is fast routine for freeing an
arbitrary number of physically contiguous pages. In particular, it
doesn't require the number of pages to be a power of two.
Use "u_long" instead of "unsigned long".
Bruce Evans (bde@) has convinced me that the "boundary" parameters
to kmem_alloc_contig(), vm_phys_alloc_contig(), and
vm_reserv_reclaim_contig() should be of type "vm_paddr_t" and not
"u_long". Make this change.
Diffstat (limited to 'sys/vm/vm_phys.h')
-rw-r--r-- | sys/vm/vm_phys.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index a5b9e93..847a633 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -50,12 +50,11 @@ struct mem_affinity { extern struct mem_affinity *mem_affinity; void vm_phys_add_page(vm_paddr_t pa); -vm_page_t vm_phys_alloc_contig(unsigned long npages, - vm_paddr_t low, vm_paddr_t high, - unsigned long alignment, unsigned long boundary); +vm_page_t vm_phys_alloc_contig(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 flind, int pool, int order); vm_page_t vm_phys_alloc_pages(int pool, int order); -vm_paddr_t vm_phys_bootstrap_alloc(vm_size_t size, unsigned long alignment); +void vm_phys_free_contig(vm_page_t m, u_long npages); void vm_phys_free_pages(vm_page_t m, int order); void vm_phys_init(void); void vm_phys_set_pool(int pool, vm_page_t m, int order); |