summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-10-22 18:21:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-10-22 18:21:41 +0000
commit91c70f367236c63af0200e82241b53d80004baa9 (patch)
tree983d3000802ea31c0e05288d5fd4ace1fa9b58b1 /sys/arch
parent11dffbaa9f31653b22f9471ca3c4c642b5c730ff (diff)
At the end of a context switch and in proc_trampoline(), instead of doing the
`restore cpl and invoke hw_setintrmask' slippery dance, just invoke splx().
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/context.S13
-rw-r--r--sys/arch/mips64/mips64/exception.S15
2 files changed, 6 insertions, 22 deletions
diff --git a/sys/arch/mips64/mips64/context.S b/sys/arch/mips64/mips64/context.S
index 2bc1781125e..35ad8fd2a03 100644
--- a/sys/arch/mips64/mips64/context.S
+++ b/sys/arch/mips64/mips64/context.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: context.S,v 1.25 2009/10/07 08:35:47 syuu Exp $ */
+/* $OpenBSD: context.S,v 1.26 2009/10/22 18:21:40 miod Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -273,7 +273,6 @@ ctx3:
* Restore registers and return.
*/
- REG_L a0, PCB_CONTEXT+13*REGSZ(t3)
REG_L s0, PCB_CONTEXT+0*REGSZ(t3)
REG_L s1, PCB_CONTEXT+1*REGSZ(t3)
REG_L s2, PCB_CONTEXT+2*REGSZ(t3)
@@ -284,16 +283,12 @@ ctx3:
REG_L s7, PCB_CONTEXT+7*REGSZ(t3)
REG_L sp, PCB_CONTEXT+8*REGSZ(t3)
REG_L s8, PCB_CONTEXT+9*REGSZ(t3)
- GET_CPU_INFO(t1, t0)
- sw a0, CI_CPL(t1)
-#ifdef IMASK_EXTERNAL
- jal hw_setintrmask
- nop
-#endif
+ jal splx
+ REG_L a0, PCB_CONTEXT+13*REGSZ(t3)
REG_L ra, PCB_CONTEXT+10*REGSZ(t3)
REG_L v0, PCB_CONTEXT+11*REGSZ(t3)
- REG_L v1, PCB_CONTEXT+12*REGSZ(t3)
#ifndef IMASK_EXTERNAL
+ REG_L v1, PCB_CONTEXT+12*REGSZ(t3)
ctc0 v1, COP_0_ICR # XXX RM7000
#endif
ori v0, v0, SR_INT_ENAB
diff --git a/sys/arch/mips64/mips64/exception.S b/sys/arch/mips64/mips64/exception.S
index cbb602acb67..6e49be298a5 100644
--- a/sys/arch/mips64/mips64/exception.S
+++ b/sys/arch/mips64/mips64/exception.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: exception.S,v 1.23 2009/10/07 08:35:47 syuu Exp $ */
+/* $OpenBSD: exception.S,v 1.24 2009/10/22 18:21:40 miod Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -521,19 +521,8 @@ LEAF(proc_trampoline, 0)
* start at spl0 and with interrupts enabled, and these
* won't ``return to userland''.
*/
- GET_CPU_INFO(t0, t1)
- sw zero, CI_CPL(t0) # lower to spl0
- lw t0, CI_IPENDING(t0)
- beqz t0, 1f
- nop
-
- jal setsoftintr0 # process any pending ints
- nop
-1:
-#ifdef IMASK_EXTERNAL
- jal hw_setintrmask
+ jal splx
xor a0, a0
-#endif
jal updateimask # Make sure SR imask is updated
xor a0, a0