summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-06-17 10:01:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-06-17 10:01:26 +0000
commit7624a188d3653ee18f612869c6a06efdc3eaa336 (patch)
treede82f525de352c387e32941c41e4f7b21a92bafe /sys
parent534154918c009a0635d7029d8785f214421f3e67 (diff)
Some alpha (or SRM) designs use level 3 for i/o interrupts, instead of the
more commonly encountered level 4. Do not complain in splassert() in this case (this is similar to the older vsbus vax machines workaround).
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/interrupt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/alpha/alpha/interrupt.c b/sys/arch/alpha/alpha/interrupt.c
index 01901d76a27..80422a8ccd6 100644
--- a/sys/arch/alpha/alpha/interrupt.c
+++ b/sys/arch/alpha/alpha/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.23 2007/05/29 18:10:41 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.24 2007/06/17 10:01:25 miod Exp $ */
/* $NetBSD: interrupt.c,v 1.46 2000/06/03 20:47:36 thorpej Exp $ */
/*-
@@ -675,6 +675,13 @@ splassert_check(int wantipl, const char *func)
if (wantipl < 0)
wantipl = IPL_SOFTINT;
+ /*
+ * Depending on the system, hardware interrupts may occur either
+ * at level 3 or level 4. Avoid false positives in the former case.
+ */
+ if (curipl == ALPHA_PSL_IPL_IO - 1)
+ curipl = ALPHA_PSL_IPL_IO;
+
if (curipl < wantipl) {
splassert_fail(wantipl, curipl, func);
/*