summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/intr_machdep.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-05-31 10:53:55 +0000
committerbde <bde@FreeBSD.org>1998-05-31 10:53:55 +0000
commitec6c6de5c612defe38320b5ec39ff98ed7c8ac7c (patch)
tree1e669cd7096649a4ebb83bcdc51c83f18faebd57 /sys/i386/isa/intr_machdep.c
parentca4b05419a6136ad127441809357f724776e3303 (diff)
downloadFreeBSD-src-ec6c6de5c612defe38320b5ec39ff98ed7c8ac7c.zip
FreeBSD-src-ec6c6de5c612defe38320b5ec39ff98ed7c8ac7c.tar.gz
Converted the ICU-level interrupt tests (3, 5 and 8) in sioprobe() into
a test of the irq number, and made failure of this test non-fatal. Removed related unused complications for the APIC_IO case. Removed the no-test3 flag. Deverbosified the failure messages for the other tests. Removed the per-port verbose flag - just use the general verbose flag.
Diffstat (limited to 'sys/i386/isa/intr_machdep.c')
-rw-r--r--sys/i386/isa/intr_machdep.c57
1 files changed, 10 insertions, 47 deletions
diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c
index 12e9e8e..7e5363f 100644
--- a/sys/i386/isa/intr_machdep.c
+++ b/sys/i386/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.9 1998/03/03 22:56:29 tegge Exp $
+ * $Id: intr_machdep.c,v 1.10 1998/05/17 21:15:18 tegge Exp $
*/
#include "opt_auto_eoi.h"
@@ -268,57 +268,20 @@ isa_strayintr(d)
}
/*
- * Return nonzero if a (masked) irq is pending for a given device.
+ * Return a bitmap of the current interrupt requests. This is 8259-specific
+ * and is only suitable for use at probe time.
*/
-#if defined(APIC_IO)
-
-int
-isa_irq_pending(dvp)
- struct isa_device *dvp;
-{
-#ifdef FAST_HI
-/* XXX not quite right for >1 IO APIC yet */
- if (dvp->id_ri_flags & RI_FAST)
- /* read APIC IRR containing the FAST INTerrupts */
- return ((lapic.irr3 & 0x00ffffff)
- & (u_int32_t)dvp->id_irq) ? 1 : 0;
- else
-#endif /* FAST_HI */
- /* read APIC IRR containing the SLOW INTerrupts */
- return ((lapic.irr1 & 0x00ffffff)
- & (u_int32_t)dvp->id_irq) ? 1 : 0;
-}
-
-/*
- * an 8259 specific routine,
- * for use by boot probes in certain device drivers.
- */
-int
-icu_irq_pending(dvp)
- struct isa_device *dvp;
+intrmask_t
+isa_irq_pending()
{
- unsigned id_irq;
- id_irq = dvp->id_irq;
- if (id_irq & 0xff)
- return (inb(IO_ICU1) & id_irq);
- return (inb(IO_ICU2) & (id_irq >> 8));
-}
-
-#else /* APIC_IO */
+ u_char irr1;
+ u_char irr2;
-int
-isa_irq_pending(dvp)
- struct isa_device *dvp;
-{
- unsigned id_irq;
- id_irq = dvp->id_irq;
- if (id_irq & 0xff)
- return (inb(IO_ICU1) & id_irq);
- return (inb(IO_ICU2) & (id_irq >> 8));
+ irr1 = inb(IO_ICU1);
+ irr2 = inb(IO_ICU2);
+ return ((irr2 << 8) | irr1);
}
-#endif /* APIC_IO */
-
int
update_intr_masks(void)
{
OpenPOWER on IntegriCloud