Adopt assert from amd64 in pmap_remove_pages().
Suggested by: kib Approved by: kib (mentor)
This commit is contained in:
parent
427c2f4ef0
commit
4729bd79cb
@ -4153,10 +4153,25 @@ pmap_remove_pages(pmap_t pmap)
|
|||||||
uint32_t inuse, bitmask;
|
uint32_t inuse, bitmask;
|
||||||
boolean_t allfree;
|
boolean_t allfree;
|
||||||
|
|
||||||
if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) {
|
/*
|
||||||
printf("warning: %s called with non-current pmap\n", __func__);
|
* Assert that the given pmap is only active on the current
|
||||||
return;
|
* CPU. Unfortunately, we cannot block another CPU from
|
||||||
|
* activating the pmap while this function is executing.
|
||||||
|
*/
|
||||||
|
KASSERT(pmap == vmspace_pmap(curthread->td_proc->p_vmspace),
|
||||||
|
("%s: non-current pmap %p", __func__, pmap));
|
||||||
|
#if defined(SMP) && defined(INVARIANTS)
|
||||||
|
{
|
||||||
|
cpuset_t other_cpus;
|
||||||
|
|
||||||
|
sched_pin();
|
||||||
|
other_cpus = pmap->pm_active;
|
||||||
|
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
||||||
|
sched_unpin();
|
||||||
|
KASSERT(CPU_EMPTY(&other_cpus),
|
||||||
|
("%s: pmap %p active on other cpus", __func__, pmap));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
SLIST_INIT(&free);
|
SLIST_INIT(&free);
|
||||||
rw_wlock(&pvh_global_lock);
|
rw_wlock(&pvh_global_lock);
|
||||||
PMAP_LOCK(pmap);
|
PMAP_LOCK(pmap);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user