diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-11-17 14:48:21 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-11-17 14:48:21 +0000 |
commit | 18877783902aa916a5ca036cb70a99b16dcf6fd0 (patch) | |
tree | 051a3bac81e28ea12d92377fb69294b3beaf98a2 /sys | |
parent | 438ea7068bb1e0c6add6fb50b775868be4fd1fce (diff) |
Be sure to pmap_deactivate() pmaps when processes exit or are scheduled out.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/process.S | 12 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/vm_machdep.c | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/mvme88k/mvme88k/process.S b/sys/arch/mvme88k/mvme88k/process.S index 87a75f36639..0487036671d 100644 --- a/sys/arch/mvme88k/mvme88k/process.S +++ b/sys/arch/mvme88k/mvme88k/process.S @@ -1,4 +1,4 @@ -/* $OpenBSD: process.S,v 1.23 2003/11/08 16:43:02 miod Exp $ */ +/* $OpenBSD: process.S,v 1.24 2003/11/17 14:48:20 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -132,6 +132,15 @@ ENTRY(cpu_switch) st r2, r14, PCB_IPL /* save ipl in pcb */ or.u r11, r0, hi16(_C_LABEL(curproc)) + ld r2, r11, lo16(_C_LABEL(curproc)) + bcnd eq0, r2, 1f + + bsr.n _C_LABEL(pmap_deactivate) + subu r31, r31,48 + addu r31, r31,48 + or.u r11, r0, hi16(_C_LABEL(curproc)) + +1: st r0, r11, lo16(_C_LABEL(curproc)) /* curproc = NULL */ ASLOCAL(Lidleloop) @@ -241,7 +250,6 @@ ASLOCAL(Ldoneloop) /* pmap_activate() the process' pmap */ or r2, r0, r9 /* r2 = p */ or r14, r0, r9 /* save p in r14 */ - /* r2 = pmap, r3 = pcb, r4 = cpu number */ bsr.n _C_LABEL(pmap_activate) subu r31, r31,48 addu r31, r31,48 diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c index 457ee22f450..1ea80bbb890 100644 --- a/sys/arch/mvme88k/mvme88k/vm_machdep.c +++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.55 2003/10/24 20:40:07 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.56 2003/11/17 14:48:20 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. @@ -158,6 +158,8 @@ cpu_fork(p1, p2, stack, stacksize, func, arg) void cpu_exit(struct proc *p) { + pmap_deactivate(p); + (void) splimp(); uvmexp.swtch++; |