aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-09-17 22:22:32 -0700
committerYinghai Lu <yinghai@kernel.org>2012-09-17 22:22:32 -0700
commit604a4e62824aedcf29b6209e93c8f90e72738783 (patch)
tree96aef1200399d8f3ff1fef4fab760762635ff761
parent98995c386717b21a219ee6f8790fc86f0409faa1 (diff)
downloadlinux-yinghai-604a4e62824aedcf29b6209e93c8f90e72738783.tar.gz
PCI: Make sure hotplug ioapic driver get loaded early
at least before port service. Some system MADT will only have no hotplug entries even those devices are there before os is booting. So we need to enable those ioapic early before real device driver need to setup ioapic irq. Also need to make it depends on X86_IO_APIC. Signed-off-by: <yinghai@kernel.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/pci/Kconfig3
-rw-r--r--drivers/pci/Makefile5
-rw-r--r--drivers/pci/ioapic.c6
3 files changed, 5 insertions, 9 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 6d51aa68ec7a6..720989fda1a58 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -110,10 +110,11 @@ config PCI_PASID
If unsure, say N.
config PCI_IOAPIC
- tristate "PCI IO-APIC hotplug support" if X86
+ bool "PCI IO-APIC hotplug support" if X86
depends on PCI
depends on ACPI
depends on HOTPLUG
+ depends on X86_IO_APIC
default !X86
config PCI_LABEL
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 8d688b260e282..92e1193024473 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -10,11 +10,12 @@ obj-$(CONFIG_SYSFS) += slot.o
obj-$(CONFIG_PCI_QUIRKS) += quirks.o
+# pre-installed hotplug ioapic need to be enabled at first
+obj-$(CONFIG_PCI_IOAPIC) += ioapic.o
+
# Build PCI Express stuff if needed
obj-$(CONFIG_PCIEPORTBUS) += pcie/
-obj-$(CONFIG_PCI_IOAPIC) += ioapic.o
-
obj-$(CONFIG_HOTPLUG) += hotplug.o
# Build the PCI Hotplug drivers if we were asked to
diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c
index 205af8dc83c21..4183a5c6cb6bc 100644
--- a/drivers/pci/ioapic.c
+++ b/drivers/pci/ioapic.c
@@ -118,10 +118,4 @@ static int __init ioapic_init(void)
return pci_register_driver(&ioapic_driver);
}
-static void __exit ioapic_exit(void)
-{
- pci_unregister_driver(&ioapic_driver);
-}
-
module_init(ioapic_init);
-module_exit(ioapic_exit);