• Jiang Liu's avatar
    PCI: acpiphp: Do not use ACPI PCI subdriver mechanism · 3b63aaa7
    Jiang Liu authored
    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: default avatarJiang Liu <jiang.liu@huawei.com>
    Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: default avatarYinghai Lu <yinghai@kernel.org>
    Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
    Cc: Toshi Kani <toshi.kani@hp.com>
    3b63aaa7
pci-acpi.c 9.82 KB