Bug 2520 - interrupt source override ineffective - ES7000
Summary: interrupt source override ineffective - ES7000
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Interrupts (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Len Brown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-15 21:35 UTC by Len Brown
Modified: 2004-05-11 23:27 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.5
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
2.6.5 (i386 only) patch (2.60 KB, patch)
2004-04-15 21:49 UTC, Len Brown
Details | Diff

Description Len Brown 2004-04-15 21:35:07 UTC
Natalie Protasevich reports: 
 
"mp_override_legacy_irq() parses ACPI INT_SRC_OVR entries, 
and each override entry results in a change of corresponding mp_irqs[] array element. 
 
The problem happens when the dest_irq (pin) numerically smaller than the bus irq 
and is assigned higher array element (we index of the srcbus_irq) that the original bus irq 
with default correspondence. The mp_irqs[] element with new bus irq gets changed allright, 
but there is still the original (unmodified) element with default one-to-one assignment above it in 
the array. 
 
Int: mp_irq 12, type 0, pol 0, trig 0, bus 0, irq 13, 129-13 <-- original entry for bus irq (and pin) 13 
Int: mp_irq 13, type 0, pol 1, trig 1, bus 0, irq 14, 129-15 
Int: mp_irq 14, type 0, pol 1, trig 1, bus 0, irq 15, 129-13 <-- modified entry for bus irq 15, with 
override for pin 13 
 
Since it is a valid entry, find_irq_entry() in setup_IO_APIC_irqs() searches the mp_irqs[] 
by the pin number and runs into this element first. It uses it to program the pin and never 
gets to the element down below that contains modified entry with a correct overwrite in it."
Comment 1 Len Brown 2004-04-15 21:49:53 UTC
Created attachment 2608 [details]
2.6.5 (i386 only) patch

The solution is to reverse the order that we initialize mp_irqs[].
ie. parse the overrides first, and then only add identity mappings
where both IRQ-N and pin-N are available to form an identity mapping.
Since there will be no duplicate entries, find_irq_entry() will
find the correct entry when it searches by pin number.
Comment 2 Len Brown 2004-05-11 23:27:20 UTC
shipped in 2.6.6, and on top of 2.4.27-pre2 -- closing. 

Note You need to log in before you can comment on or make changes to this bug.