apic_irq() returns -1 when there is no match for (IOAPIC, intpin) pair.

Adjust some comments to better match the code.
This commit is contained in:
Tor Egge 1999-12-15 01:14:56 +00:00
parent b94e4b7331
commit 787749e519
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54618

View File

@ -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)