diff options
author | marcel <marcel@FreeBSD.org> | 2014-02-16 20:26:22 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2014-02-16 20:26:22 +0000 |
commit | 6c90e2f6f5fb6d9ef6c6dab9355bba8c385b56d5 (patch) | |
tree | 1213cf136c0be9e8be55a22e6f57dad77e3ee89a /sys/ia64 | |
parent | a0e0e5fec0946cd27d467777523abc62733f6e72 (diff) | |
download | FreeBSD-src-6c90e2f6f5fb6d9ef6c6dab9355bba8c385b56d5.zip FreeBSD-src-6c90e2f6f5fb6d9ef6c6dab9355bba8c385b56d5.tar.gz |
MFC r259244:
Allow pmap_remove_pages() to be called for physical maps not
associated with the current thread.
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 3e84839..49418cd 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -2118,19 +2118,16 @@ pmap_remove_pages(pmap_t pmap) { struct pv_chunk *pc, *npc; struct ia64_lpte *pte; + pmap_t oldpmap; pv_entry_t pv; vm_offset_t va; vm_page_t m; u_long inuse, bitmask; int allfree, bit, field, idx; - if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { - printf("warning: %s called with non-current pmap\n", - __func__); - return; - } rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); + oldpmap = pmap_switch(pmap); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { @@ -2170,8 +2167,9 @@ pmap_remove_pages(pmap_t pmap) free_pv_chunk(pc); } } - rw_wunlock(&pvh_global_lock); + pmap_switch(oldpmap); PMAP_UNLOCK(pmap); + rw_wunlock(&pvh_global_lock); } /* |