summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-05-21 16:08:06 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-05-21 16:08:06 +0000
commit48afd62ab628ba85aa9ff6a2f2ada8acba5ff4dc (patch)
treeb490e459353bd33f78b440f663e18038715648b5 /sys/arch/mips64
parent63474a303adb628529d2863e15eba9f624242d52 (diff)
Make sure splx() reenables hardware interrupt sources, even there aren't
any such interrupts marked as pending.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/mips64/interrupt.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c
index a0ed3367e16..2c07070237e 100644
--- a/sys/arch/mips64/mips64/interrupt.c
+++ b/sys/arch/mips64/mips64/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.35 2009/04/25 20:35:06 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.36 2009/05/21 16:08:04 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -287,7 +287,6 @@ splinit()
#endif
}
-#ifndef INLINE_SPLRAISE
int
splraise(int newcpl)
{
@@ -299,4 +298,29 @@ splraise(int newcpl)
__asm__ (" sync\n .set reorder\n");
return (oldcpl);
}
+
+void
+splx(int newcpl)
+{
+ if (ipending & ~newcpl)
+ (*pending_hand)(newcpl);
+ else {
+ __asm__ (" .set noreorder\n");
+ cpl = newcpl;
+ __asm__ (" sync\n .set reorder\n");
+#ifdef IMASK_EXTERNAL
+ hw_setintrmask(newcpl);
#endif
+ }
+}
+
+int
+spllower(int newcpl)
+{
+ int oldcpl;
+
+ oldcpl = cpl;
+ splx(newcpl);
+ return (oldcpl);
+}
+