diff options
author | Tor Egge <tegge@FreeBSD.org> | 1999-12-15 01:14:56 +0000 |
---|---|---|
committer | Tor Egge <tegge@FreeBSD.org> | 1999-12-15 01:14:56 +0000 |
commit | 787749e519481bea6c9191feceda60c9b53bce78 (patch) | |
tree | 4ee1b47d695e02948ee8ad10118c941857b4656c | |
parent | b94e4b73315c60574be4adb31b0078844698b720 (diff) | |
download | src-787749e519481bea6c9191feceda60c9b53bce78.tar.gz src-787749e519481bea6c9191feceda60c9b53bce78.zip |
apic_irq() returns -1 when there is no match for (IOAPIC, intpin) pair.
Adjust some comments to better match the code.
Notes
Notes:
svn path=/head/; revision=54618
-rw-r--r-- | sys/i386/i386/mpapic.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index ee0a6b37b4ec..a008eb53be6d 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -173,7 +173,7 @@ io_apic_setup(int apic) continue; irq = apic_irq(apic, pin); - if (irq == 0xff) + if (irq < 0) continue; /* determine the bus type for this pin */ @@ -182,17 +182,22 @@ io_apic_setup(int apic) continue; bustype = apic_bus_type(bus); - /* the "ISA" type INTerrupts */ if ((bustype == ISA) && (pin < IOAPIC_ISA_INTS) && (irq == pin) && (apic_polarity(apic, pin) == 0x1) && (apic_trigger(apic, pin) == 0x3)) { + /* + * A broken BIOS might describe some ISA + * interrupts as active-high level-triggered. + * Use default ISA flags for those interrupts. + */ flags = DEFAULT_ISA_FLAGS; - } - - /* PCI or other bus */ - else { + } else { + /* + * Program polarity and trigger mode according to + * interrupt entry. + */ flags = DEFAULT_FLAGS; level = trigger(apic, pin, &flags); if (level == 1) |