summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-06-15 20:08:30 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-06-15 20:08:30 +0000
commit3c18738eebc3ab152ffb51145446e53abd3236d3 (patch)
tree65edf799ed5992b4b991b8ce6eeff4ef74f2e0b7 /sys/arch/alpha/dev
parentfd293392db098cbdef234cf36ac226873023a403 (diff)
Rework the interrupt code, shaving some cycles off in the process.
Rather than an "iointr" routine that decomposes a vector into an IRQ, we maintain a vector table directly, hooking up each "iointr" routine at the correct vector. This also allows us to hook device interrupts up to specific vectors. From thorpej NetBSD Tested by myself and a number of end-users.
Diffstat (limited to 'sys/arch/alpha/dev')
-rw-r--r--sys/arch/alpha/dev/shared_intr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/alpha/dev/shared_intr.c b/sys/arch/alpha/dev/shared_intr.c
index 685e3e92f28..b5d8f8c9480 100644
--- a/sys/arch/alpha/dev/shared_intr.c
+++ b/sys/arch/alpha/dev/shared_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shared_intr.c,v 1.14 2006/01/29 10:47:35 martin Exp $ */
+/* $OpenBSD: shared_intr.c,v 1.15 2006/06/15 20:08:29 brad Exp $ */
/* $NetBSD: shared_intr.c,v 1.13 2000/03/19 01:46:18 thorpej Exp $ */
/*
@@ -215,6 +215,14 @@ alpha_shared_intr_isactive(intr, num)
return (!TAILQ_EMPTY(&intr[num].intr_q));
}
+int
+alpha_shared_intr_firstactive(struct alpha_shared_intr *intr, unsigned int num)
+{
+
+ return (!TAILQ_EMPTY(&intr[num].intr_q) &&
+ TAILQ_NEXT(intr[num].intr_q.tqh_first, ih_q) == NULL);
+}
+
void
alpha_shared_intr_set_dfltsharetype(intr, num, newdfltsharetype)
struct alpha_shared_intr *intr;