PCI: don't load acpi_php when acpi is disabled
authorYinghai Lu <Yinghai.Lu@Sun.COM>
Tue, 5 Feb 2008 08:01:48 +0000 (00:01 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Feb 2008 23:34:37 +0000 (15:34 -0800)
When acpi=off and pci=nomsi, don't load acpiphp.

Fixes this:

pci_hotplug: PCI Hot Plug PCI Core version: 0.5
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread
FFFF81103CC54000 could not acquire Mutex [1] [20070126]

[akpm@linux-foundation.org: export acpi_pci_disabled for acpiphp.ko]
[akpm@linux-foundation.org: fix return statement]
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/acpi/boot.c
drivers/pci/hotplug/acpiphp_core.c

index 680b7300a48966dc0162adc05577541d8cc47854..2cdc9de9371dd0d941406c11af288a8582c4e475 100644 (file)
@@ -72,7 +72,8 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return
 #define PREFIX                 "ACPI: "
 
 int acpi_noirq;                                /* skip ACPI IRQ initialization */
-int acpi_pci_disabled __initdata;      /* skip ACPI PCI scan and IRQ initialization */
+int acpi_pci_disabled;         /* skip ACPI PCI scan and IRQ initialization */
+EXPORT_SYMBOL(acpi_pci_disabled);
 int acpi_ht __initdata = 1;    /* enable HT */
 
 int acpi_lapic;
index c8c263875c2179572812709eed979b5b47067931..9279d5ba62e6aa675a792c09c5bc52574a126ed4 100644 (file)
@@ -392,6 +392,9 @@ static int __init acpiphp_init(void)
 {
        info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 
+       if (acpi_pci_disabled)
+               return 0;
+
        acpiphp_debug = debug;
 
        /* read all the ACPI info from the system */
@@ -401,6 +404,9 @@ static int __init acpiphp_init(void)
 
 static void __exit acpiphp_exit(void)
 {
+       if (acpi_pci_disabled)
+               return;
+
        /* deallocate internal data structures etc. */
        acpiphp_glue_exit();
 }