diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2014-08-08 17:12:03 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2014-08-08 17:12:03 +0000 |
commit | 39ffa8c138a37381f273a1d9231cc9b98d4275d0 (patch) | |
tree | 0e7cb8ef3548f12ba3d175300ec28e89f06df725 /sys/vm/vm_fault.c | |
parent | e1ba604a96e3aab8d87a4561258a945df362f85f (diff) | |
download | src-39ffa8c138a37381f273a1d9231cc9b98d4275d0.tar.gz src-39ffa8c138a37381f273a1d9231cc9b98d4275d0.zip |
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
Notes
Notes:
svn path=/head/; revision=269728
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r-- | sys/vm/vm_fault.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index cedc59cd849e..5a1b2c20d487 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -902,7 +902,8 @@ vnode_locked: * back on the active queue until later so that the pageout daemon * won't find it (yet). */ - pmap_enter(fs.map->pmap, vaddr, fault_type, fs.m, prot, wired); + pmap_enter(fs.map->pmap, vaddr, fs.m, prot, + fault_type | (wired ? PMAP_ENTER_WIRED : 0), 0); if (faultcount != 1 && (fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && wired == 0) vm_fault_prefault(&fs, vaddr, faultcount, reqpage); @@ -1318,7 +1319,8 @@ again: * mapping is being replaced by a write-enabled * mapping, then wire that new mapping. */ - pmap_enter(dst_map->pmap, vaddr, access, dst_m, prot, upgrade); + pmap_enter(dst_map->pmap, vaddr, dst_m, prot, + access | (upgrade ? PMAP_ENTER_WIRED : 0), 0); /* * Mark it no longer busy, and put it on the active list. |