From 5d98f3c472df5592e8b5adc0549c2ece606416f5 Mon Sep 17 00:00:00 2001 From: marcel Date: Mon, 19 May 2003 06:05:30 +0000 Subject: 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) --- sys/ia64/ia64/pmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/ia64') diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 94003f3..c76871e 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -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); } -- cgit v1.1