Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc be sure to re-enable interrupts bef...
details: https://anonhg.NetBSD.org/src/rev/a352b8547f97
branches: trunk
changeset: 534904:a352b8547f97
user: chs <chs%NetBSD.org@localhost>
date: Tue Aug 06 06:21:58 2002 +0000
description:
be sure to re-enable interrupts before calling trap() a second time
due to an AST. the rule is that we must always have interrupts
enabled when acquiring kernel_lock, so that we can process blocking IPIs
from another CPU which is already holding kernel_lock.
reduce differences between the MP and non-MP versions of this file.
diffstat:
sys/arch/powerpc/powerpc/trap_subr.S | 13 ++++++-------
sys/arch/powerpc/powerpc/trap_subr_mp.S | 6 +++---
2 files changed, 9 insertions(+), 10 deletions(-)
diffs (101 lines):
diff -r 911798cc51e2 -r a352b8547f97 sys/arch/powerpc/powerpc/trap_subr.S
--- a/sys/arch/powerpc/powerpc/trap_subr.S Tue Aug 06 06:20:08 2002 +0000
+++ b/sys/arch/powerpc/powerpc/trap_subr.S Tue Aug 06 06:21:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap_subr.S,v 1.27 2002/08/02 03:46:45 chs Exp $ */
+/* $NetBSD: trap_subr.S,v 1.28 2002/08/06 06:21:58 chs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -347,7 +347,6 @@
* (Code essentially from the 603e User Manual, Chapter 5, but
* corrected a lot.)
*/
-
.globl _C_LABEL(tlbimiss),_C_LABEL(tlbimsize)
_C_LABEL(tlbimiss):
#ifdef PMAPDEBUG
@@ -566,7 +565,7 @@
addi 1,1,ddbstk+INTSTK@l
bla ddbtrap
_C_LABEL(ddbsize) = .-_C_LABEL(ddblow)
-#endif /* DDB | KGDB */
+#endif /* DDB || KGDB */
#ifdef IPKDB
#define ipkdbsave 0xde0 /* primary save area for IPKDB */
@@ -734,13 +733,13 @@
k_trap:
FRAME_SETUP(tempsave)
+trapagain:
/* Now we can recover interrupts again: */
mfmsr 7
ori 7,7,(PSL_EE|PSL_ME|PSL_RI)@l
mtmsr 7
isync
/* Call C trap code: */
-trapagain:
addi 3,1,8
bl _C_LABEL(trap)
.globl trapexit
@@ -839,7 +838,7 @@
mfctr 31 /* & CTR */
mfdar 3
s_pte_spill:
- bl _C_LABEL(pmap_pte_spill) /* try a spill */
+ bl _C_LABEL(pmap_pte_spill) /* try a spill */
or. 3,3,3
mtctr 31 /* restore CTR */
mtlr 30 /* and trap type */
@@ -1016,7 +1015,7 @@
bl _C_LABEL(decr_intr)
b intr_exit
-#if defined(DDB)
+#ifdef DDB
/*
* Deliberate entry to ddbtrap
*/
@@ -1171,7 +1170,7 @@
stw 5,0(9) /* restore previous fault handler */
dcbst 0,9 /* and flush data... */
sync
- icbi 0,9 /* and instruction caches */
+ icbi 0,9 /* and instruction caches */
blr
#endif /* IPKDB */
.globl _C_LABEL(trapend)
diff -r 911798cc51e2 -r a352b8547f97 sys/arch/powerpc/powerpc/trap_subr_mp.S
--- a/sys/arch/powerpc/powerpc/trap_subr_mp.S Tue Aug 06 06:20:08 2002 +0000
+++ b/sys/arch/powerpc/powerpc/trap_subr_mp.S Tue Aug 06 06:21:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap_subr_mp.S,v 1.6 2002/08/02 03:46:46 chs Exp $ */
+/* $NetBSD: trap_subr_mp.S,v 1.7 2002/08/06 06:21:58 chs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -664,13 +664,13 @@
k_trap:
FRAME_SETUP(CI_TEMPSAVE)
+trapagain:
/* Now we can recover interrupts again: */
mfmsr 7
ori 7,7,(PSL_EE|PSL_ME|PSL_RI)@l
mtmsr 7
isync
/* Call C trap code: */
-trapagain:
addi 3,1,8
bl _C_LABEL(trap)
.globl trapexit
@@ -901,7 +901,7 @@
CPU601_KERN_LEAVE(3,4)
GET_CPUINFO(4)
RESTORE_USER_SRS(3,4)
- lwz 4,CI_ASTPENDING(4) /* Test AST pending */
+ lwz 4,CI_ASTPENDING(4) /* Test AST pending */
andi. 4,4,1
beq 1f
/* Setup for entry to realtrap: */
Home |
Main Index |
Thread Index |
Old Index