[PATCH][2.4] fix "pci=noacpi" boot option

From: Thomas Schlichter
Date: Tue Oct 14 2003 - 16:30:24 EST


Hi Len,

some time ago I sent a patch which fixed problems with the "pci=noacpi" boot
option of the 2.5.xx linux-kernel. It got applied to the 2.5 kernel tree but
I missed to create a similar fix for the 2.4 tree which seems to have the
same issue.

Now I've seen reports of people having problems with the "pci=noacpi" boot
option with current 2.4.xx kernel versions, too. So I ported my old patch to
2.4.22-bk34, tested it and attached it to this mail. You may consider pushing
it to Marcelo.

Kind regards,
Thomas
--- linux-2.4.22-bk34/arch/i386/kernel/acpi.c.orig Tue Oct 14 20:50:18 2003
+++ linux-2.4.22-bk34/arch/i386/kernel/acpi.c Tue Oct 14 20:53:45 2003
@@ -58,6 +58,7 @@

#ifdef CONFIG_ACPI_BOOT
extern int acpi_disabled;
+extern int acpi_irq;
extern int acpi_ht;

enum acpi_irq_model_id acpi_irq_model;
@@ -415,7 +416,7 @@
* If MPS is present, it will handle them,
* otherwise the system will stay in PIC mode
*/
- if (acpi_disabled) {
+ if (acpi_disabled || !acpi_irq) {
return 1;
}

--- linux-2.4.22-bk34/arch/i386/kernel/setup.c.orig Tue Oct 14 20:50:25 2003
+++ linux-2.4.22-bk34/arch/i386/kernel/setup.c Tue Oct 14 20:57:34 2003
@@ -184,6 +184,7 @@
EXPORT_SYMBOL(acpi_disabled);

#ifdef CONFIG_ACPI_BOOT
+ int acpi_irq __initdata = 1; /* enable IRQ */
int acpi_ht __initdata = 1; /* enable HT */
#endif

@@ -848,6 +849,11 @@
else if (!memcmp(from, "acpi=ht", 7)) {
acpi_ht = 1;
if (!acpi_force) acpi_disabled = 1;
+ }
+
+ /* "pci=noacpi" disables ACPI interrupt routing */
+ else if (!memcmp(from, "pci=noacpi", 10)) {
+ acpi_irq = 0;
}

/* disable IO-APIC */

Attachment: pgp00001.pgp
Description: signature