[PATCH] x86/ioapic: Ignore root bridges without a companion ACPI device
From: Rui Wang
Date: Sat Sep 10 2016 - 10:56:34 EST
Some PCI root bridges don't have a corresponding ACPI device.
Don't call acpi_ioapic_add() on these bridges because they can't
support ioapic hotplug.
Signed-off-by: Rui Wang <rui.y.wang@xxxxxxxxx>
---
drivers/pci/setup-bus.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index ec538d3..2b05ac6 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1852,10 +1852,15 @@ dump:
void __init pci_assign_unassigned_resources(void)
{
struct pci_bus *root_bus;
+ acpi_handle root_handle;
list_for_each_entry(root_bus, &pci_root_buses, node) {
pci_assign_unassigned_root_bus_resources(root_bus);
- acpi_ioapic_add(ACPI_HANDLE(root_bus->bridge));
+ root_handle = ACPI_HANDLE(root_bus->bridge);
+
+ /* make sure the root bridge has a companion ACPI device */
+ if (root_handle)
+ acpi_ioapic_add(root_handle);
}
}
--
1.8.3.1