From 25782a7fab8e1a1c60517dab118fec0a98648dd6 Mon Sep 17 00:00:00 2001 From: kib Date: Sun, 24 Aug 2014 07:53:15 +0000 Subject: Merge the changes to pmap_enter(9) for sleep-less operation (requested by flag). The ia64 pmap.c changes are direct commit, since ia64 is removed on head. MFC r269368 (by alc): Retire PVO_EXECUTABLE. MFC r269728: Change pmap_enter(9) interface to take flags parameter and superpage mapping size (currently unused). MFC r269759 (by alc): Update the text of a KASSERT() to reflect the changes in r269728. MFC r269822 (by alc): Change {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP instead of M_NOWAIT/M_WAITOK when deciding whether to sleep on page table page allocation. MFC r270151 (by alc): Replace KASSERT that no PV list locks are held with a conditional unlock. Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation --- sys/vm/vm_fault.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/vm/vm_fault.c') diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 7ac8a86..70e1d73 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -907,7 +907,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 ((fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && wired == 0) vm_fault_prefault(fs.map->pmap, vaddr, fs.entry); VM_OBJECT_WLOCK(fs.object); @@ -1369,7 +1370,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. -- cgit v1.1