]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: VIOT: Fix ACS setup
authorEric Auger <eric.auger@redhat.com>
Thu, 30 Jun 2022 09:40:59 +0000 (11:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 5 Jul 2022 18:25:39 +0000 (20:25 +0200)
commit204332040257ac8e7c4c2c292b94845f55a8dbef
tree206893bed229a01f88b40ae49984ec31688c1b2d
parent1b68ebd3d24bb21b76bad3eec1cff5fe29f36122
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: 19b5c1f8a183 ("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>
drivers/acpi/bus.c
drivers/acpi/viot.c
include/linux/acpi_viot.h