diff options
author | tegge <tegge@FreeBSD.org> | 1998-04-19 23:19:20 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-04-19 23:19:20 +0000 |
commit | 64e2dfa0bb7dd8d4a7affdfbf920764d02d2b02c (patch) | |
tree | 6c314fd0e428e1f9ebae82336a174d2c2bbfc529 | |
parent | 901c8a6cfa96b97f7f01686479706895b233eb71 (diff) | |
download | FreeBSD-src-64e2dfa0bb7dd8d4a7affdfbf920764d02d2b02c.zip FreeBSD-src-64e2dfa0bb7dd8d4a7affdfbf920764d02d2b02c.tar.gz |
Disregard the values for polarity and trigger mode in the MP config table
for ISA interrupts where the IOAPIC interrupt pin number is the same as
the ISA interrupt number (i.e. partial backout of previous commit)
-rw-r--r-- | sys/i386/i386/mpapic.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index f2d545b..40b8235 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mpapic.c,v 1.28 1998/03/03 19:54:49 tegge Exp $ + * $Id: mpapic.c,v 1.29 1998/04/01 21:07:34 tegge Exp $ */ #include "opt_smp.h" @@ -164,7 +164,7 @@ io_apic_setup(int apic) if (apic == 0) { maxpin = REDIRCNT_IOAPIC(apic); /* pins in APIC */ for (pin = 0; pin < maxpin; ++pin) { - int bus; + int bus, bustype; /* we only deal with vectored INTs here */ if (apic_int_type(apic, pin) != 0) @@ -174,12 +174,23 @@ io_apic_setup(int apic) bus = apic_src_bus_id(apic, pin); if (bus == -1) continue; - - flags = DEFAULT_FLAGS; - level = trigger(apic, pin, &flags); - if (level == 1) - apic_pin_trigger[apic] |= (1 << pin); - polarity(apic, pin, &flags, level); + bustype = apic_bus_type(bus); + + /* the "ISA" type INTerrupts */ + if ((bustype == ISA) && + (pin < IOAPIC_ISA_INTS) && + (isa_apic_pin(pin) == pin)) { + flags = DEFAULT_ISA_FLAGS; + } + + /* PCI or other bus */ + else { + flags = DEFAULT_FLAGS; + level = trigger(apic, pin, &flags); + if (level == 1) + apic_pin_trigger[apic] |= (1 << pin); + polarity(apic, pin, &flags, level); + } /* program the appropriate registers */ select = pin * 2 + IOAPIC_REDTBL0; /* register */ |