* [PATCH] ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle
@ 2017-09-14 14:50 Vitaly Kuznetsov
2017-09-26 20:25 ` Bjorn Helgaas
0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Kuznetsov @ 2017-09-14 14:50 UTC (permalink / raw)
To: linux-acpi, linux-pci
Cc: linux-kernel, Rafael J. Wysocki, Len Brown, Bjorn Helgaas,
Jork Loeser, K. Y. Srinivasan, Stephen Hemminger
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() with 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>
---
drivers/pci/pci-acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index a8da543b3814..4708eb9df71b 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -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);
--
2.13.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle
2017-09-26 20:25 ` Bjorn Helgaas
@ 2017-09-26 20:21 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2017-09-26 20:21 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Vitaly Kuznetsov, linux-acpi, linux-pci, linux-kernel, Len Brown,
Bjorn Helgaas, Jork Loeser, K. Y. Srinivasan, Stephen Hemminger
On Tuesday, September 26, 2017 10:25:08 PM CEST Bjorn Helgaas wrote:
> On Thu, Sep 14, 2017 at 04:50:14PM +0200, Vitaly Kuznetsov wrote:
> > 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() with 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>
>
> Applied to pci/acpi for v4.15, thanks!
>
> Rafael, let me know if you have any objections or if you'd rather take
> it yourself.
No objections, all is fine.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle
2017-09-14 14:50 [PATCH] ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle Vitaly Kuznetsov
@ 2017-09-26 20:25 ` Bjorn Helgaas
2017-09-26 20:21 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2017-09-26 20:25 UTC (permalink / raw)
To: Vitaly Kuznetsov
Cc: linux-acpi, linux-pci, linux-kernel, Rafael J. Wysocki,
Len Brown, Bjorn Helgaas, Jork Loeser, K. Y. Srinivasan,
Stephen Hemminger
On Thu, Sep 14, 2017 at 04:50:14PM +0200, Vitaly Kuznetsov wrote:
> 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() with 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>
Applied to pci/acpi for v4.15, thanks!
Rafael, let me know if you have any objections or if you'd rather take
it yourself.
> ---
> drivers/pci/pci-acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index a8da543b3814..4708eb9df71b 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -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);
> --
> 2.13.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-26 20:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 14:50 [PATCH] ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle Vitaly Kuznetsov
2017-09-26 20:25 ` Bjorn Helgaas
2017-09-26 20:21 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).