linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] iommu/of: Fix request and enable ACS for of_iommu_configure
@ 2021-05-07 12:49 Wang Xingang
  2021-05-07 12:49 ` [PATCH 1/1] " Wang Xingang
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Xingang @ 2021-05-07 12:49 UTC (permalink / raw)
  To: will, joro
  Cc: bhelgaas, gregkh, iommu, linux-kernel, linux-pci, xieyingtai,
	wangxingang5

From: Xingang Wang <wangxingang5@huawei.com>

When request ACS in of_iommu_configure, the pci_acs_init procedure has
already been called. The pci device probe procedure is like the following:
pci_host_common_probe
    pci_device_add
        pci_acs_init
of_iommu_configure
    pci_request_acs

The pci_request_acs() does not work because the pci_acs_init and
pci_enable_acs procedure has already finished, so the ACS is not
enabled as expected.  Besides, the ACS is enabled only if IOMMU is
detected and the device is pci.

So this fix 6bf6c24720d33 ("iommu/of: Request ACS from the PCI core
when configuring IOMMU linkage"), add pci_enable_acs() and IOMMU check
to make sure ACS is enabled for the pci_device.

Xingang Wang (1):
  iommu/of: Fix request and enable ACS for of_iommu_configure

 drivers/iommu/of_iommu.c | 10 +++++++++-
 drivers/pci/pci.c        |  2 +-
 include/linux/pci.h      |  1 +
 3 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-08  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 12:49 [PATCH 0/1] iommu/of: Fix request and enable ACS for of_iommu_configure Wang Xingang
2021-05-07 12:49 ` [PATCH 1/1] " Wang Xingang
2021-05-07 21:14   ` Bjorn Helgaas
2021-05-08  1:32     ` Xingang Wang

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).