diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-04-12 01:44:26 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-12 18:52:01 -0400 |
commit | 3b63aaa70e1ccc4b66d60acc78da09700706a703 (patch) | |
tree | 6255864d51d65ab0d833e197a9ef9080d83a68de /include/linux/pci-acpi.h | |
parent | 6037a803b05eef9943fb64982e19964007fb7478 (diff) |
PCI: acpiphp: Do not use ACPI PCI subdriver mechanism
Previously the acpiphp driver registered itself as an ACPI PCI subdriver,
so its callbacks were invoked when creating/destroying PCI root
buses to manage ACPI-based PCI hotplug slots. But it doesn't handle
P2P bridge hotplug events, so it will cause strange behaviour if there
are hotplug slots associated with a hot-removed P2P bridge.
This patch fixes this issue by:
1) Directly hooking into PCI core to update hotplug slot devices when
creating/destroying PCI buses through:
pci_{add|remove}_bus() -> acpi_pci_{add|remove}_bus()
2) Getting rid of unused ACPI PCI subdriver-related code
It also cleans up unused code in the acpiphp driver.
[bhelgaas: keep acpi_pci_add_bus() stub for CONFIG_ACPI=n]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'include/linux/pci-acpi.h')
-rw-r--r-- | include/linux/pci-acpi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 23cd40abba4f..81b31613eb25 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -56,6 +56,17 @@ static inline void acpi_pci_slot_enumerate(struct pci_bus *bus, | |||
56 | static inline void acpi_pci_slot_remove(struct pci_bus *bus) { } | 56 | static inline void acpi_pci_slot_remove(struct pci_bus *bus) { } |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #ifdef CONFIG_HOTPLUG_PCI_ACPI | ||
60 | void acpiphp_init(void); | ||
61 | void acpiphp_enumerate_slots(struct pci_bus *bus, acpi_handle handle); | ||
62 | void acpiphp_remove_slots(struct pci_bus *bus); | ||
63 | #else | ||
64 | static inline void acpiphp_init(void) { } | ||
65 | static inline void acpiphp_enumerate_slots(struct pci_bus *bus, | ||
66 | acpi_handle handle) { } | ||
67 | static inline void acpiphp_remove_slots(struct pci_bus *bus) { } | ||
68 | #endif | ||
69 | |||
59 | #else /* CONFIG_ACPI */ | 70 | #else /* CONFIG_ACPI */ |
60 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } | 71 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } |
61 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } | 72 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } |