mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Unconditionally set pcb_current_pmap. WIP versions of the code
previously committed cleared pcb_current_pmap prior to changing the region registers, but that was removed before committing. Since we don't normally (at all?) pass a NULL pointer, the bug was mostly harmless. Fix it while I'm here... I'm here because we need to have data serialization after writing to the region registers. Not doing so was likely the cause of the hangs we were experiencing. General exceptions in cpu_switch may also be caused by the lack of serialization. Approved by: re (blanket)
This commit is contained in:
parent
dc0bde0f18
commit
a75b99ea2d
1 changed files with 2 additions and 1 deletions
|
|
@ -2558,8 +2558,9 @@ pmap_switch(pmap_t pm)
|
|||
(pm->pm_rid[i] << 8)|(PAGE_SHIFT << 2)|1);
|
||||
}
|
||||
atomic_set_32(&pm->pm_active, PCPU_GET(cpumask));
|
||||
PCPU_SET(current_pmap, pm);
|
||||
}
|
||||
PCPU_SET(current_pmap, pm);
|
||||
__asm __volatile("srlz.d");
|
||||
return (prevpm);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue