From akpm@linux-foundation.org Tue Feb 5 00:01:50 2008 From: Yinghai Lu Date: Tue, 05 Feb 2008 00:01:48 -0800 Subject: PCI: don't load acpi_php when acpi is disabled To: mingo@elte.hu Cc: tglx@linutronix.de, akpm@linux-foundation.org, Yinghai.Lu@Sun.COM, greg@kroah.com, kristen.c.accardi@intel.com, yinghai.lu@Sun.COM Message-ID: <200802050801.m1581TIT011123@imap1.linux-foundation.org> From: Yinghai Lu 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 Cc: Kristen Carlson Accardi Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/acpi/boot.c | 3 ++- drivers/pci/hotplug/acpiphp_core.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -72,7 +72,8 @@ static inline int acpi_madt_oem_check(ch #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; --- a/drivers/pci/hotplug/acpiphp_core.c +++ b/drivers/pci/hotplug/acpiphp_core.c @@ -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(); }