x86/ioapic: Ignore root bridges without a companion ACPI device
PATCH 1/1 x86/ioapic: Ignore root bridges without a companion ACPI device
Some PCI root bridges don't have a corresponding ACPI device. This can be the case on some old platforms. Don't call acpi_ioapic_add() on these bridges because they can't support ioapic hotplug.
v2: Per Boris's review, removed the unnecessary local var; refined comment
--- drivers/pci/setup-bus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/setup-bus.c +4 -1
@@ -1855,7 +1855,10 @@ void __init pci_assign_unassigned_resources(void)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)); + +/* make sure the root bridge has a companion ACPI device */ +if (ACPI_HANDLE (root_bus->bridge)) +acpi_ioapic_add (ACPI_HANDLE (root_bus->bridge)); } }
Signature · 1 line
1.8.3.1
Quoted 18 lines · Rui Wang
Some PCI root bridges don't have a corresponding ACPI device. This can be the case on some old platforms. Don't call
acpi_ioapic_add()on these bridges because they can't support ioapic hotplug.v2: Per Boris's review, removed the unnecessary local var; refined comment
Signed-off-by Rui Wang <[email protected]>Reviewed-by Borislav Petkov <[email protected]>--- drivers/pci/setup-bus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/pci/setup-bus.c +0
-0
drivers/pci/setup-bus.c void __init pci_assign_unassigned_resources(void) · line 1861
Quoted 8 lines
drivers/pci/setup-bus.c +4
-1@@ -1855,7 +1855,10 @@ void __init pci_assign_unassigned_resources(void)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)); + +/* make sure the root bridge has a companion ACPI device */ +if (ACPI_HANDLE (root_bus->bridge)) +acpi_ioapic_add (ACPI_HANDLE (root_bus->bridge));
Thanks Rui!
Signature · 4 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.tip-bot for Rui Wang
merge botx86/ioapic: Ignore root bridges without a companion ACPI device
Commit-ID: d9c149d6ce1a94de578a4e323f6881fcb6b986ab Gitweb: http://git.kernel.org/tip/d9c149d6ce1a94de578a4e323f6881fcb6b986ab Author: Rui Wang <[email protected]> AuthorDate: Sat, 10 Sep 2016 23:40:45 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Sat, 10 Sep 2016 20:30:31 +0200
x86/ioapic: Ignore root bridges without a companion ACPI device
Some PCI root bridges don't have a corresponding ACPI device. This can be the case on some old platforms. Don't call acpi_ioapic_add() on these bridges because they can't support ioapic hotplug.
--- drivers/pci/setup-bus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/setup-bus.c +4 -1
@@ -1855,7 +1855,10 @@ void __init pci_assign_unassigned_resources(void)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)); + +/* Make sure the root bridge has a companion ACPI device: */ +if (ACPI_HANDLE (root_bus->bridge)) +acpi_ioapic_add (ACPI_HANDLE (root_bus->bridge)); } }
Quoted 3 lines · Rui Wang
Some PCI root bridges don't have a corresponding ACPI device. This can be the case on some old platforms. Don't call
acpi_ioapic_add()on these bridges because they can't support ioapic hotplug.
Not just old platforms. VMD is a new device which initializes a root port in software without an acpi handle.
What branch is this based on? I can't find the relevant code/commits
Quoted 1 line
What branch is this based on? I can't find the relevant code/commits
tip tree. branch x86/apic
-Tony
Quoted 5 lines · Tony
Quoted 1 line
What branch is this based on? I can't find the relevant code/commits
tip tree. branch x86/apic
-Tony
Cheers!