summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/include/intr.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hp300/include/intr.h')
-rw-r--r--sys/arch/hp300/include/intr.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/hp300/include/intr.h b/sys/arch/hp300/include/intr.h
index 9676a0f3c01..a151adebb6b 100644
--- a/sys/arch/hp300/include/intr.h
+++ b/sys/arch/hp300/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.21 2007/11/09 17:32:27 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.22 2007/11/09 17:46:03 miod Exp $ */
/* $NetBSD: intr.h,v 1.2 1997/07/24 05:43:08 scottr Exp $ */
/*-
@@ -54,14 +54,7 @@ struct isr {
struct evcount isr_count;
};
-/*
- * These four globals contain the appropriate PSL_S|PSL_IPL? values
- * to raise interrupt priority to the requested level.
- */
-extern unsigned short hp300_bioipl;
-extern unsigned short hp300_netipl;
-extern unsigned short hp300_ttyipl;
-extern unsigned short hp300_vmipl;
+#define NISR 8
/*
* Interrupt "levels". These are a more abstract representation
@@ -74,23 +67,30 @@ extern unsigned short hp300_vmipl;
#define IPL_NONE 0
#define IPL_SOFTNET 1
#define IPL_SOFTCLOCK 1
-#define IPL_BIO 1
-#define IPL_NET 2
-#define IPL_TTY 3
+#define IPL_BIO 2
+#define IPL_NET 3
+#define IPL_TTY 4
+#define IPL_VM 5
#define IPL_CLOCK 6
#define IPL_STATCLOCK 6
#define IPL_HIGH 7
+/*
+ * This array contains the appropriate PSL_S|PSL_IPL? values
+ * to raise interrupt priority to the requested level.
+ */
+extern unsigned short hp300_varpsl[NISR];
+
/* These spl calls are used by machine-independent code. */
#define splsoft() _splraise(PSL_S | PSL_IPL1)
#define splsoftclock() splsoft()
#define splsoftnet() splsoft()
-#define splbio() _splraise(hp300_bioipl)
-#define splnet() _splraise(hp300_netipl)
-#define spltty() _splraise(hp300_ttyipl)
+#define splbio() _splraise(hp300_varpsl[IPL_BIO])
+#define splnet() _splraise(hp300_varpsl[IPL_NET])
+#define spltty() _splraise(hp300_varpsl[IPL_TTY])
#define splclock() _splraise(PSL_S | PSL_IPL6)
#define splstatclock() _splraise(PSL_S | PSL_IPL6)
-#define splvm() _splraise(hp300_vmipl)
+#define splvm() _splraise(hp300_varpsl[IPL_VM])
#define splhigh() _spl(PSL_S | PSL_IPL7)
#define splsched() splhigh()