Bug 9153 - PnPACPI ignores IOAPIC Interrupt Source Overrides
Summary: PnPACPI ignores IOAPIC Interrupt Source Overrides
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Interrupts (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Shaohua
: 5243 (view as bug list)
Depends on:
Reported: 2007-10-12 13:38 UTC by Len Brown
Modified: 2007-12-03 22:38 UTC (History)
5 users (show)

See Also:
Kernel Version: up through 2.6.23
Tree: Mainline
Regression: ---

patch (3.60 KB, patch)
2007-10-14 23:18 UTC, Shaohua
Details | Diff
MADT (3.28 KB, text/plain)
2007-10-15 15:27 UTC, Max Asbock
DSDT (59.10 KB, text/plain)
2007-10-15 15:29 UTC, Max Asbock
patch (4.15 KB, patch)
2007-10-15 18:05 UTC, Shaohua
Details | Diff
updated patch (4.72 KB, patch)
2007-10-25 18:15 UTC, Shaohua
Details | Diff

Description Len Brown 2007-10-12 13:38:59 UTC
This problem has always been present in the PNPACPI code.
It has shown up on i386, since PNPACPI was deployed there first.
But now that PNPACPI is included in x86_64 by default also,
and so the issue will spread there too.

The workaround is to boot with "pnpacpi=off"

This issue was diagnosed by IBM here:

The RTC fails in IOAPIC mode due to mis-programmed IRQ8 polarity.
There is an Interrupt Source Override for IRQ8 -- Edge LOW.
The legacy mapping implicitly asks for,
and the DSDT explicitly asks for, Edge HIGH.

Linux first programs IRQ8 according to the Interrupt Source
Override -- but PNPACPI later runs and re-programs it
according to the DSDT.

So, PNPACPI needs to learn about Interupt Source Overrides
in IOAPIC mode, and must honor them.
Comment 1 Shaohua 2007-10-14 17:50:39 UTC
please check if the workaroud in 'http://bugzilla.kernel.org/show_bug.cgi?id=5243' works for you? AKPM already includes the workaround in -mm.
Comment 2 Shaohua 2007-10-14 18:02:16 UTC
Oh, sounds no, so the IRQ should be edge low instead of edge high? can you please attach the acpidump, I can't access the novell bugzilla.
Comment 3 Shaohua 2007-10-14 23:18:07 UTC
Created attachment 13159 [details]

Could you please try attached patch? With it, interrupt override is considered.
Comment 4 Max Asbock 2007-10-15 15:25:44 UTC
I tried the patch from comment #3. 
The 2.6.23-mm1 kernel without the patch re-programs the RTC interrupt with the wrong polarity.
With the patch applied the RTC interrupt works as expected, i.e the override in the MADT is being respected.
There is one problem with the patch: it causes the following warning:
WARNING: vmlinux.o(.text+0x166c5): Section mismatch: reference to .init.text:MPBIOS_polarity (between 'acpi_get_override_irq' and 'IO_APIC_get_PCI_irq_vector')
The acpi_get_override_irq function uses MPBIOS_polarity which is declared as __init. 
Comment 5 Max Asbock 2007-10-15 15:27:50 UTC
Created attachment 13173 [details]

Here is the MADT of the affected system, showing the IRQ override for IRQ 8
Comment 6 Max Asbock 2007-10-15 15:29:18 UTC
Created attachment 13174 [details]

Here is the DSDT (disassembled) of the affected system showing the PNP entry for IRQ8
Comment 7 Shaohua 2007-10-15 18:05:54 UTC
Created attachment 13175 [details]

Ok, fixed the warning. Let's wait if it fix the bug 5243.
Comment 8 Shaohua 2007-10-25 17:42:17 UTC
*** Bug 5243 has been marked as a duplicate of this bug. ***
Comment 9 Shaohua 2007-10-25 18:15:33 UTC
Created attachment 13282 [details]
updated patch

This is the updated patch. Just move one '\n' and refreshed it against latest git tree, no functional change
Comment 10 Fu Michael 2007-11-12 17:41:12 UTC
*** Bug 7679 has been marked as a duplicate of this bug. ***
Comment 11 Len Brown 2007-11-16 22:15:47 UTC
The patch in comment #9
1. fixes the screaming IRQ8 on the STL2 in bug 5243.
2. is applied to acpi test branch
Comment 12 Len Brown 2007-12-03 22:38:06 UTC
shipped in linux-2.6.24-rc4

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