diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-12-27 00:27:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-12-27 00:27:20 +0000 |
commit | ed3a4b59eb9f47de8399688a7c7d401bf4d4c734 (patch) | |
tree | bb8e93b7b038010a811c6a00b505f8ed780622a6 /sys/arch | |
parent | 90f8942c32b00998c60aeff1926768212f6ba328 (diff) |
new priority mechanism for pcmcia interrupt allocation, ie. "best effort"
for machines low on interrupts. work by fgsch, and myself
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/dev/shared_intr.c | 16 | ||||
-rw-r--r-- | sys/arch/i386/isa/isa_machdep.c | 7 |
2 files changed, 14 insertions, 9 deletions
diff --git a/sys/arch/alpha/dev/shared_intr.c b/sys/arch/alpha/dev/shared_intr.c index bc547ccd8bd..d2b31d27cf1 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.3 1998/06/29 05:32:50 downsj Exp $ */ +/* $OpenBSD: shared_intr.c,v 1.4 1998/12/27 00:27:18 deraadt Exp $ */ /* $NetBSD: shared_intr.c,v 1.1 1996/11/17 02:03:08 cgd Exp $ */ /* @@ -125,15 +125,17 @@ alpha_shared_intr_check(intr, num, type) return (0); switch (intr[num].intr_sharetype) { - case IST_EDGE: + case IST_NONE: + return (2); + break; case IST_LEVEL: - if (type == intr[num].intr_sharetype) - break; + if (type != intr[num].intr_sharetype) + return (0); + return (2); + case IST_EDGE: case IST_PULSE: if ((type != IST_NONE) && (intr[num].intr_q.tqh_first != NULL)) - return (0); - case IST_NONE: - break; + return (0); } return (1); diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c index 23f2b2370a0..2193fddeb99 100644 --- a/sys/arch/i386/isa/isa_machdep.c +++ b/sys/arch/i386/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_machdep.c,v 1.31 1998/07/17 22:00:00 deraadt Exp $ */ +/* $OpenBSD: isa_machdep.c,v 1.32 1998/12/27 00:27:16 deraadt Exp $ */ /* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */ #define ISA_DMA_STATS @@ -446,6 +446,7 @@ isa_intr_alloc(ic, mask, type, irq) /* * Just check to see if an IRQ is available/can be shared. + * 0 = no match, 1 = ok match, 2 = great match */ int isa_intr_check(ic, irq, type) @@ -458,12 +459,14 @@ isa_intr_check(ic, irq, type) switch (intrtype[irq]) { case IST_NONE: + return (2); break; - case IST_EDGE: case IST_LEVEL: if (type != intrtype[irq]) return (0); + return (2); break; + case IST_EDGE: case IST_PULSE: if (type != IST_NONE) return (0); |