svn commit: r259244 - head/sys/ia64/ia64
Marcel Moolenaar
marcel at FreeBSD.org
Thu Dec 12 03:04:01 UTC 2013
Author: marcel
Date: Thu Dec 12 03:04:00 2013
New Revision: 259244
URL: http://svnweb.freebsd.org/changeset/base/259244
Log:
Allow pmap_remove_pages() to be called for physical maps not
associated with the current thread.
Obtained from: alc@
Modified:
head/sys/ia64/ia64/pmap.c
Modified: head/sys/ia64/ia64/pmap.c
==============================================================================
--- head/sys/ia64/ia64/pmap.c Thu Dec 12 02:04:59 2013 (r259243)
+++ head/sys/ia64/ia64/pmap.c Thu Dec 12 03:04:00 2013 (r259244)
@@ -2103,19 +2103,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++) {
@@ -2155,8 +2152,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);
}
/*
More information about the svn-src-head
mailing list