summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-11-19 20:15:05 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-11-19 20:15:05 +0000
commitbfb1e5309562c6883170e2748c69777bed55600f (patch)
tree53ef4bc4797e9d1f576e8867e543ba3c5ec1cebb /sys
parentcaef78a243ae42b3eac78ec5120f6fa768e82a48 (diff)
All callers of updateimask() immediately enable interrupts afterwards, so do
it in updateimask() itself. No functional change.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mips64/mips64/cp0access.S5
-rw-r--r--sys/arch/mips64/mips64/exception.S9
-rw-r--r--sys/arch/mips64/mips64/interrupt.c7
3 files changed, 8 insertions, 13 deletions
diff --git a/sys/arch/mips64/mips64/cp0access.S b/sys/arch/mips64/mips64/cp0access.S
index d28fd8a7ba4..3b95bba058a 100644
--- a/sys/arch/mips64/mips64/cp0access.S
+++ b/sys/arch/mips64/mips64/cp0access.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cp0access.S,v 1.10 2009/10/22 18:46:48 miod Exp $ */
+/* $OpenBSD: cp0access.S,v 1.11 2009/11/19 20:15:04 miod Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -128,6 +128,9 @@ LEAF(updateimask, 0)
or v1, v0
mtc0 v1, COP_0_STATUS_REG
ITLBNOPFIX
+ ori v1, SR_INT_ENAB # enable interrupts
+ mtc0 v1, COP_0_STATUS_REG
+ ITLBNOPFIX
jr ra
move v0, v1
END(updateimask)
diff --git a/sys/arch/mips64/mips64/exception.S b/sys/arch/mips64/mips64/exception.S
index 3aafc6637a6..33b9decb75f 100644
--- a/sys/arch/mips64/mips64/exception.S
+++ b/sys/arch/mips64/mips64/exception.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: exception.S,v 1.26 2009/10/22 22:08:54 miod Exp $ */
+/* $OpenBSD: exception.S,v 1.27 2009/11/19 20:15:04 miod Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -524,12 +524,7 @@ LEAF(proc_trampoline, 0)
jal splx
xor a0, a0
jal updateimask # Make sure SR imask is updated
- xor a0, a0
-
- mfc0 t0, COP_0_STATUS_REG # enable interrupts
- ori t0, SR_INT_ENAB
- mtc0 t0, COP_0_STATUS_REG
- ITLBNOPFIX
+ xor a0, a0 # and interrupts enabled
jal s0
move a0,s1 # invoke callback.
diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c
index 8ec207ab116..3bb13031041 100644
--- a/sys/arch/mips64/mips64/interrupt.c
+++ b/sys/arch/mips64/mips64/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.49 2009/10/22 22:08:54 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.50 2009/11/19 20:15:04 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -200,7 +200,6 @@ splinit()
{
struct proc *p = curproc;
struct pcb *pcb = &p->p_addr->u_pcb;
- u_int32_t sr;
/*
* Update proc0 pcb to contain proper values.
@@ -213,9 +212,7 @@ splinit()
(idle_mask & SR_INT_MASK);
spl0();
- sr = updateimask(0);
- sr |= SR_INT_ENAB;
- setsr(sr);
+ (void)updateimask(0);
}
int