Commit f78f856f authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Kleber Sacilotto de Souza

ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle

BugLink: https://bugs.launchpad.net/bugs/1792109

commit a0040c01 upstream.

Hyper-V instances support PCI pass-through which is implemented through PV
pci-hyperv driver. When a device is passed through, a new root PCI bus is
created in the guest. The bus sits on top of VMBus and has no associated
information in ACPI. acpi_pci_add_bus() in this case proceeds all the way
to acpi_evaluate_dsm(), which reports

  ACPI: \: failed to evaluate _DSM (0x1001)

While acpi_pci_slot_enumerate() and acpiphp_enumerate_slots() are protected
against ACPI_HANDLE() being NULL and do nothing, acpi_evaluate_dsm() is not
and gives us the error. It seems the correct fix is to not do anything in
acpi_pci_add_bus() in such cases.
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Cc: Sinan Kaya <okaya@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 4f889292
...@@ -545,7 +545,7 @@ void acpi_pci_add_bus(struct pci_bus *bus) ...@@ -545,7 +545,7 @@ void acpi_pci_add_bus(struct pci_bus *bus)
union acpi_object *obj; union acpi_object *obj;
struct pci_host_bridge *bridge; struct pci_host_bridge *bridge;
if (acpi_pci_disabled || !bus->bridge) if (acpi_pci_disabled || !bus->bridge || !ACPI_HANDLE(bus->bridge))
return; return;
acpi_pci_slot_enumerate(bus); acpi_pci_slot_enumerate(bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment