diff options
author | kib <kib@FreeBSD.org> | 2014-08-08 17:12:03 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-08-08 17:12:03 +0000 |
commit | 094158b3f2a6f1f1c94fd8c1357192c5d7486a79 (patch) | |
tree | 0e7cb8ef3548f12ba3d175300ec28e89f06df725 /sys/vm/pmap.h | |
parent | 3ed5bde00cf51c1adc0152be002adec285130187 (diff) | |
download | FreeBSD-src-094158b3f2a6f1f1c94fd8c1357192c5d7486a79.zip FreeBSD-src-094158b3f2a6f1f1c94fd8c1357192c5d7486a79.tar.gz |
Change pmap_enter(9) interface to take flags parameter and superpage
mapping size (currently unused). The flags includes the fault access
bits, wired flag as PMAP_ENTER_WIRED, and a new flag
PMAP_ENTER_NOSLEEP to indicate that pmap should not sleep.
For powerpc aim both 32 and 64 bit, fix implementation to ensure that
the requested mapping is created when PMAP_ENTER_NOSLEEP is not
specified, in particular, wait for the available memory required to
proceed.
In collaboration with: alc
Tested by: nwhitehorn (ppc aim32 and booke)
Sponsored by: The FreeBSD Foundation and EMC / Isilon Storage Division
MFC after: 2 weeks
Diffstat (limited to 'sys/vm/pmap.h')
-rw-r--r-- | sys/vm/pmap.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index 1f2a017..d73babc 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -97,6 +97,13 @@ struct thread; */ extern vm_offset_t kernel_vm_end; +/* + * Flags for pmap_enter(). The bits in the low-order byte are reserved + * for the protection code (vm_prot_t) that describes the fault type. + */ +#define PMAP_ENTER_NOSLEEP 0x0100 +#define PMAP_ENTER_WIRED 0x0200 + void pmap_activate(struct thread *td); void pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice); @@ -107,8 +114,8 @@ void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); void pmap_copy_page(vm_page_t, vm_page_t); void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], vm_offset_t b_offset, int xfersize); -void pmap_enter(pmap_t, vm_offset_t, vm_prot_t, vm_page_t, - vm_prot_t, boolean_t); +int pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, + vm_prot_t prot, u_int flags, int8_t psind); void pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end, vm_page_t m_start, vm_prot_t prot); void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, |