PCI hotplug: move IOAPIC support from acpiphp to ioapic driver
PATCH 1/1 PCI hotplug: move IOAPIC support from acpiphp to ioapic driver
This patch moves PCI I/O APIC support from acpiphp to a separate driver.
Like pciehp and shpchp, acpiphp handles PCI hotplug, i.e., addition and removal of PCI adapters. But in addition, acpiphp handles some ACPI hotplug, such as the addition of new host bridges, and the I/O APIC support was tangled up with that.
I don't think the I/O APIC support needs to be in acpiphp; PCI I/O APICs usually appear as a function on a PCI host bridge, and we'll enumerate the APIC before any of the devices behind the bridge that use it.
As far as I know, nobody actually uses I/O APIC hotplug. It depends on acpi_register_ioapic(), which is only implemented for ia64, and I don't think any vendors have supported I/O chassis hotplug yet.
Kenji-san, I think this new file needs a Fujitsu copyright, but there wasn't one in acpiphp_glue to copy. If you send me one, I'll put it in the next version of this patch.
--- drivers/pci/Kconfig | 7 + drivers/pci/Makefile | 2 drivers/pci/hotplug/acpiphp.h | 6 - drivers/pci/hotplug/acpiphp_glue.c | 190 ------------------------------------ drivers/pci/ioapic.c | 127 ++++++++++++++++++++++++ 5 files changed, 136 insertions(+), 196 deletions(-) create mode 100644 drivers/pci/ioapic.c
drivers/pci/Kconfig +7 -0
@@ -69,3 +69,10 @@ config PCI_IOV physical resources. If unsure, say N. + +config PCI_IOAPIC + bool + depends on PCI + depends on ACPI + depends on HOTPLUG + default y
drivers/pci/Makefile +2 -0
@@ -14,6 +14,8 @@ CFLAGS_legacy.o += -Wno-deprecated-declarations # 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
drivers/pci/hotplug/acpiphp.h +0 -6
@@ -146,12 +146,6 @@ struct acpiphp_attention_infostruct module *owner; }; -struct acpiphp_ioapic { -struct pci_dev *dev; -u32 gsi_base; -struct list_head list; -}; -/* PCI bus bridge HID */ #define ACPI_PCI_HOST_HID "PNP0A03"
drivers/pci/hotplug/acpiphp_glue.c +0 -190
220 lines not on this page · raw message
drivers/pci/ioapic.c new file +127 -0
127 lines not on this page · raw message
Quoted 11 lines · Bjorn Helgaas
This patch moves PCI I/O APIC support from acpiphp to a separate driver.
Like pciehp and shpchp, acpiphp handles PCI hotplug, i.e., addition and removal of PCI adapters. But in addition, acpiphp handles some ACPI hotplug, such as the addition of new host bridges, and the I/O APIC support was tangled up with that.
I don't think the I/O APIC support needs to be in acpiphp; PCI I/O APICs usually appear as a function on a PCI host bridge, and we'll enumerate the APIC before any of the devices behind the bridge that use it.
Quoted 8 lines
As far as I know, nobody actually uses I/O APIC hotplug. It depends on
acpi_register_ioapic(), which is only implemented for ia64, and I don't think any vendors have supported I/O chassis hotplug yet.Kenji-san, I think this new file needs a Fujitsu copyright, but there wasn't one in
acpiphp_glueto copy. If you send me one, I'll put it in the next version of this patch.
Looks good to me.
And here is Fujitsu copyright (thank you for asking me about that).
Copyright (C) 2009 Fujitsu Limited.
Thanks,
Kenji Kaneshige