diff options
-rw-r--r-- | sys/alpha/alpha/pmap.c | 5 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 3 | ||||
-rw-r--r-- | sys/arm/arm/pmap.c | 5 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 3 | ||||
-rw-r--r-- | sys/ia64/ia64/pmap.c | 5 | ||||
-rw-r--r-- | sys/kern/kern_exec.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_exit.c | 2 |
7 files changed, 10 insertions, 15 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index 51bd126..c8624cd 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -2185,7 +2185,6 @@ pmap_remove_pages(pmap, sva, eva) pt_entry_t *pte, tpte; vm_page_t m; pv_entry_t pv, npv; - int s; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { @@ -2194,7 +2193,7 @@ pmap_remove_pages(pmap, sva, eva) } #endif - s = splvm(); + vm_page_lock_queues(); PMAP_LOCK(pmap); for(pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; @@ -2240,9 +2239,9 @@ pmap_remove_pages(pmap, sva, eva) pmap_unuse_pt(pv->pv_pmap, pv->pv_va, pv->pv_ptem); free_pv_entry(pv); } - splx(s); pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); + vm_page_unlock_queues(); } /* diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 8748923..8f9d880 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2459,7 +2459,7 @@ pmap_remove_pages(pmap, sva, eva) return; } #endif - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); PMAP_LOCK(pmap); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { @@ -2521,6 +2521,7 @@ pmap_remove_pages(pmap, sva, eva) } pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); + vm_page_unlock_queues(); } /* diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c index 1cb35b6..77d5279 100644 --- a/sys/arm/arm/pmap.c +++ b/sys/arm/arm/pmap.c @@ -2620,7 +2620,6 @@ pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) struct l2_bucket *l2b; pt_entry_t *pte, tpte; pv_entry_t pv, npv; - int s; vm_page_t m; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY @@ -2630,7 +2629,7 @@ pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) } #endif - s = splvm(); + vm_page_lock_queues(); for(pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { if (pv->pv_va >= eva || pv->pv_va < sva) { npv = TAILQ_NEXT(pv, pv_plist); @@ -2675,8 +2674,8 @@ pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) pmap_unuse_pt(pv->pv_pmap, pv->pv_va, pv->pv_ptem); pmap_free_pv_entry(pv); } - splx(s); pmap_invalidate_tlb_all(pmap); + vm_page_unlock_queues(); } diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 74d6f92..52eb344 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -2531,7 +2531,7 @@ pmap_remove_pages(pmap, sva, eva) return; } #endif - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); PMAP_LOCK(pmap); sched_pin(); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { @@ -2595,6 +2595,7 @@ pmap_remove_pages(pmap, sva, eva) sched_unpin(); pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); + vm_page_unlock_queues(); } /* diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 01b6892..2e3cb88 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -1847,7 +1847,6 @@ void pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { pv_entry_t pv, npv; - int s; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { @@ -1856,7 +1855,7 @@ pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) } #endif - s = splvm(); + vm_page_lock_queues(); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { @@ -1875,9 +1874,9 @@ pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) pmap_remove_pte(pmap, pte, pv->pv_va, pv, 1); } - splx(s); pmap_invalidate_all(pmap); + vm_page_unlock_queues(); } /* diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 0c7a6d8..873a39c 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -864,10 +864,8 @@ exec_new_vmspace(imgp, sv) if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv->sv_minuser && vm_map_max(map) == sv->sv_maxuser) { shmexit(vmspace); - vm_page_lock_queues(); pmap_remove_pages(vmspace_pmap(vmspace), vm_map_min(map), vm_map_max(map)); - vm_page_unlock_queues(); vm_map_remove(map, vm_map_min(map), vm_map_max(map)); } else { vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser); diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 056116d..1db90ab 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -275,10 +275,8 @@ retry: ++vm->vm_exitingcnt; if (--vm->vm_refcnt == 0) { shmexit(vm); - vm_page_lock_queues(); pmap_remove_pages(vmspace_pmap(vm), vm_map_min(&vm->vm_map), vm_map_max(&vm->vm_map)); - vm_page_unlock_queues(); (void) vm_map_remove(&vm->vm_map, vm_map_min(&vm->vm_map), vm_map_max(&vm->vm_map)); } |