[PATCH 12/13] PCI: Make sure hotplug ioapic driver get loaded early

From: Yinghai Lu
Date: Thu Feb 23 2012 - 22:52:15 EST


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.

Signed-off-by: <yinghai@xxxxxxxxxx>
Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
---
drivers/pci/Kconfig | 2 +-
drivers/pci/Makefile | 5 +++--
drivers/pci/ioapic.c | 6 ------
3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 37856f7..c920a9d 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -98,7 +98,7 @@ 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
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 083a49f..7b4ff82 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 205af8d..4183a5c 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);
--
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/