Bug 5637

Summary: regression booting with kernels >= 2.6.13 on ACER TM529TXV without acpi=noirq fails
Product: ACPI Reporter: Joachim Rudolph (joachim.rudolph)
Component: Config-InterruptsAssignee: ykzhao (yakui.zhao)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: acpi-bugzilla, martin
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: >= 2.6.13 ... 2.6.15-rc2 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: acpidump_acer_tm529txv
dmidecode_acer_tm529txv
lspci -vv for acer Travelmate 529TXV
dmesg of a working 2.6.12 kernel
/proc/interrupts of a working 2.6.12 kernel
dmesg of a 2.6.14_FC kernel booted with irqpoll
dmesg of a 2.6.15_rc2 kernel with acpi=noirq
/proc/interrupts of a 2.6.15-rc2 kernel with acpi=noirq
debug patch
Not register gsi for PCI IDE controller in legacy mode

Description Joachim Rudolph 2005-11-23 04:39:38 UTC
Most recent kernel where this bug did not occur:2.6.12
Distribution:Fedora Core 4
Hardware Environment:ACER Travelmate 529TXV
Software Environment:
Problem Description:after upgrading the kernel to something >=2.6.13 it fails to
boot
Bootprocess hangs with : irq 15: nobody cared
With irqpoll the system boots but is unstable
acpi=off -> boot is o.k.
acpi=strict -> fails to boot
acpi=noirq -> boot is o.k.


Steps to reproduce:
boot kernel 2.6.13 or later ..
Comment 1 Joachim Rudolph 2005-11-23 04:40:37 UTC
Created attachment 6654 [details]
acpidump_acer_tm529txv
Comment 2 Joachim Rudolph 2005-11-23 04:41:16 UTC
Created attachment 6655 [details]
dmidecode_acer_tm529txv
Comment 3 Joachim Rudolph 2005-11-23 04:41:57 UTC
Created attachment 6656 [details]
lspci -vv for acer Travelmate 529TXV
Comment 4 Joachim Rudolph 2005-11-23 04:42:46 UTC
Created attachment 6657 [details]
dmesg of a working 2.6.12 kernel
Comment 5 Joachim Rudolph 2005-11-23 04:43:19 UTC
Created attachment 6658 [details]
/proc/interrupts of a working 2.6.12 kernel
Comment 6 Joachim Rudolph 2005-11-23 04:44:14 UTC
Created attachment 6659 [details]
dmesg of a 2.6.14_FC kernel booted with irqpoll
Comment 7 Joachim Rudolph 2005-11-23 04:45:04 UTC
Created attachment 6660 [details]
dmesg of a 2.6.15_rc2 kernel with acpi=noirq
Comment 8 Joachim Rudolph 2005-11-23 04:45:50 UTC
Created attachment 6661 [details]
/proc/interrupts of a 2.6.15-rc2 kernel with acpi=noirq
Comment 9 Joachim Rudolph 2005-11-23 04:47:09 UTC
the patch from novell bug 116763 applied to 2.6.15-rc2 does not help
Comment 10 Fredrik Elestedt 2005-11-24 04:33:38 UTC
I have the same problem on my computer...

Most recent kernel where this bug did not occur: 2.6.12.5
Distribution: Gentoo Linux using vanilla-sources
Hardware Environment: HP nw8240
Software Environment: Nothing special
Problem Description:after upgrading the kernel to something >=2.6.13 it fails to
boot
Comment 11 Len Brown 2007-08-18 23:49:08 UTC
Joachim, Fredrik,
please try "pnpacpi=off"
Comment 12 ykzhao 2007-10-18 01:34:39 UTC
Hi, Joachim & Fredrik 
Can the system work well now ?
If it still can't work well , please enable the debug of pci & acpi in kernel configuration and upload the following info.
a. acpidump
b. dmesg
c. lspci -xxx & lspci -v 
Thanks.
Comment 13 ykzhao 2007-11-22 22:26:40 UTC
Hi, Joachim & Fredrik
The root cause about the regression is listed in the following:
1. When the system is booted with acpi mode, there is no PCI router for PCI device(0:0:10:0 IDE PCI controller) in the ACPI table. In the phase of IDE pci controller the system will guess the IRQ and set the IRQ 15 to level/low mode. (This was added by Linus in 2005)
   Unfortunately the IRQ 15 is used by IDE1 interface and the default mode should be edge/high. 
   Because the mode of IRQ 15 is uncorrect, there will be interrupt flood about the IRQ 15 and the system will report that nobody care for IRQ 15.
2. The system(acpi_pci_irq_enable) doesn't set the IRQ mode for guess IRQ in kernel 2.6.12 if there is no PCI router in ACPI table. It means that IDE1 will continue using the IRQ 15 as Edge/High. So there is no interrupt flood.

Thanks.
Comment 14 ykzhao 2007-11-22 22:30:53 UTC
Hi, Joachim & Fredrik
The root cause about the regression is listed in the following:
1. When the system is booted with acpi mode, there is no PCI router for PCI
device(0:0:10:0 IDE PCI controller) in the ACPI table. In the initialization phase of PCI IDE controller the system will guess the IRQ and set the IRQ 15 to level/low mode.(This function was added by Linus Torvalds in 2005)
   Unfortunately the IRQ 15 is used by IDE1 interface and the default mode
should be edge/high. 
   Because the mode of IRQ 15 is uncorrect, there will be interrupt flood about
the IRQ 15 and the system will report that nobody care for IRQ 15.
2. The system(acpi_pci_irq_enable) doesn't set the IRQ mode for guess IRQ in
kernel 2.6.12 if there is no PCI router in ACPI table. It means that IDE1 will
continue using the IRQ 15 as Edge/High. So there is no interrupt flood.

Thanks.
Comment 15 Zhang Rui 2007-12-04 22:31:40 UTC
Created attachment 13855 [details]
debug patch

This patch will not register irq 15
Comment 16 Zhang Rui 2007-12-04 22:33:27 UTC
The patch in comment #15 will not register irq 15 as low level.
Joachim and Fredric,
Please try this patch and see if it can work for you. :)
Comment 17 Joachim Rudolph 2007-12-11 14:34:49 UTC
after getting my old computer from the attic and spending a weekend to re-learn how to build a kernel I can provide you the needed info :
I did three tests:
vanilla kernel linux-2.6.23.9 -> fails to boot.
vanilla kernel linux-2.6.23.9 with command line pci=noacpi -> boots

vanilla kernel linux-2.6.23.9 with your patch applied and no command line changes -> boots

It seems that your patch works.
I hope this info helps.
Comment 18 ykzhao 2007-12-16 23:34:41 UTC
Created attachment 14072 [details]
Not register gsi for PCI IDE controller in legacy mode
Comment 19 ykzhao 2007-12-19 17:18:53 UTC
*** Bug 7783 has been marked as a duplicate of this bug. ***
Comment 20 Len Brown 2008-01-10 19:54:25 UTC
Joachim,
Thanks, so much, for testing.
The patch in comment #17 has been applied to the acpi test tree.
Comment 21 Len Brown 2008-01-13 23:16:13 UTC
patch in comment #17
shipped in linux-2.6.24-rc7-git5

closed.