summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2022-06-30 11:40:59 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-07-05 20:25:39 +0200
commit3dcb861dbc6ab101838a1548b1efddd00ca3c3ec (patch)
tree206893bed229a01f88b40ae49984ec31688c1b2d /drivers/acpi/bus.c
parent88084a3df1672e131ddc1b4e39eeacfd39864acf (diff)
downloadlinux-3dcb861dbc6ab101838a1548b1efddd00ca3c3ec.tar.gz
linux-3dcb861dbc6ab101838a1548b1efddd00ca3c3ec.tar.bz2
linux-3dcb861dbc6ab101838a1548b1efddd00ca3c3ec.zip
ACPI: VIOT: Fix ACS setup
Currently acpi_viot_init() gets called after the pci device has been scanned and pci_enable_acs() has been called. So pci_request_acs() fails to be taken into account leading to wrong single iommu group topologies when dealing with multi-function root ports for instance. We cannot simply move the acpi_viot_init() earlier, similarly as the IORT init because the VIOT parsing relies on the pci scan. However we can detect VIOT is present earlier and in such a case, request ACS. Introduce a new acpi_viot_early_init() routine that allows to call pci_request_acs() before the scan. While at it, guard the call to pci_request_acs() with #ifdef CONFIG_PCI. Fixes: 3cf485540e7b ("ACPI: Add driver for the VIOT table") Signed-off-by: Eric Auger <eric.auger@redhat.com> Reported-by: Jin Liu <jinl@redhat.com> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 86fa61a21826..906ad8153fd9 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -1400,6 +1400,7 @@ static int __init acpi_init(void)
pci_mmcfg_late_init();
acpi_iort_init();
+ acpi_viot_early_init();
acpi_hest_init();
acpi_ghes_init();
acpi_scan_init();