]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 14 Sep 2017 14:50:14 +0000 (16:50 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 5 Oct 2017 20:48:54 +0000 (15:48 -0500)
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: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-acpi.c

index a8da543b3814b312a99af0ef1f3c3ef18e089478..4708eb9df71b0ebb7548b87e4cb4238a0b900b6a 100644 (file)
@@ -624,7 +624,7 @@ void acpi_pci_add_bus(struct pci_bus *bus)
        union acpi_object *obj;
        struct pci_host_bridge *bridge;
 
-       if (acpi_pci_disabled || !bus->bridge)
+       if (acpi_pci_disabled || !bus->bridge || !ACPI_HANDLE(bus->bridge))
                return;
 
        acpi_pci_slot_enumerate(bus);