[patch] ioapic-2.4.5-A1

Ingo Molnar (mingo@elte.hu)
Tue, 29 May 2001 13:11:08 +0200 (CEST)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--8323328-1030739712-991134668=:3146
Content-Type: TEXT/PLAIN; charset=US-ASCII

the attached ioapic-2.4.5-A1 patch includes a number of important IO-APIC
related fixes (against 2.4.5-ac3):

- correctly handle bridged devices that are not listed in the mptable
directly. This fixes eg. dual-port eepro100 devices on Compaq boxes
with such PCI layout:

-+-[0d]---0b.0
+-[05]-+-02.0
| \-0b.0
\-[00]-+-02.0
+-03.0-[01]--+-04.0 <=== eth0
| \-05.0 <=== eth1
+-0b.0
+-0c.0
+-0d.0
+-0e.0
+-0f.0
+-14.0
+-14.1
+-19.0
+-1a.0
\-1b.0

without the patch the eepro100 devices get misdetected as XT-PIC IRQs
and their interrupts are stuck.

- the srcbus entry in the mptable does not have to be translated into
a PCI-bus value.

- add more APIC versions to the whitelist

- initialize mp_bus_id_to_pci_bus[] correctly, so that we can detect
nonlisted/bridged PCI busses more accurately.

the patch should only affect systems that were not working properly
before, but it might break broken-mptable systems - we'll see.

Ingo

--8323328-1030739712-991134668=:3146
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ioapic-2.4.5-A1"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.33.0105291311080.3146@localhost.localdomain>
Content-Description:
Content-Disposition: attachment; filename="ioapic-2.4.5-A1"

LS0tIGxpbnV4L2FyY2gvaTM4Ni9rZXJuZWwvaW9fYXBpYy5jLm9yaWcJVHVl
IE1heSAyOSAxMjoxMzoxNSAyMDAxDQorKysgbGludXgvYXJjaC9pMzg2L2tl
cm5lbC9pb19hcGljLmMJVHVlIE1heSAyOSAxMjoxOTo1NSAyMDAxDQpAQCAt
MjU2LDEwICsyNTYsMTYgQEANCiAgKi8NCiBzdGF0aWMgaW50IHBpbl8yX2ly
cShpbnQgaWR4LC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5udW1iZXIsIFBDSV9TTE9UKGRldi0+ZGV2Zm4pLCBwaW4sIGlycSk7
DQo=
--8323328-1030739712-991134668=:3146--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/