diff options
author | kib <kib@FreeBSD.org> | 2012-05-12 20:42:56 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-05-12 20:42:56 +0000 |
commit | 9ff1ec42a4c0d37d3675e60e7b68cae42df1a954 (patch) | |
tree | 0b49fefb6622aaedac7bf526163774e487e14627 /sys/vm/vm_page.h | |
parent | 1ad1048d19f6c3f268b6cd701a9aa01021fea708 (diff) | |
download | FreeBSD-src-9ff1ec42a4c0d37d3675e60e7b68cae42df1a954.zip FreeBSD-src-9ff1ec42a4c0d37d3675e60e7b68cae42df1a954.tar.gz |
Add a facility to register a range of physical addresses to be used
for allocation of fictitious pages, for which PHYS_TO_VM_PAGE()
returns proper fictitious vm_page_t. The range should be de-registered
after consumer stopped using it.
De-inline the PHYS_TO_VM_PAGE() since it now carries code to iterate
over registered ranges.
A hash container might be developed instead of range registration
interface, and fake pages could be put automatically into the hash,
were PHYS_TO_VM_PAGE() could look them up later. This should be
considered before the MFC of the commit is done.
Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r-- | sys/vm/vm_page.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index cad8c03..479c5bf 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -321,19 +321,7 @@ extern long first_page; /* first physical page number */ vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); -static __inline vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); - -static __inline vm_page_t -PHYS_TO_VM_PAGE(vm_paddr_t pa) -{ -#ifdef VM_PHYSSEG_SPARSE - return (vm_phys_paddr_to_vm_page(pa)); -#elif defined(VM_PHYSSEG_DENSE) - return (&vm_page_array[atop(pa) - first_page]); -#else -#error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." -#endif -} +vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); extern struct vpglocks vm_page_queue_lock; |