linux/drivers/acpi/arm64
Robin Murphy bc8648d49a ACPI/IORT: Handle PCI aliases properly for IOMMUs
When a PCI device has DMA quirks, we need to ensure that an upstream
IOMMU knows about all possible aliases, since the presence of a DMA
quirk does not preclude the device still also emitting transactions
(e.g. MSIs) on its 'real' RID. Similarly, the rules for bridge aliasing
are relatively complex, and some bridges may only take ownership of
transactions under particular transient circumstances, leading again to
multiple RIDs potentially being seen at the IOMMU for the given device.

Take all this into account in iort_iommu_configure() by mapping every
RID produced by the alias walk, not just whichever one comes out last.
Since adding any more internal PTR_ERR() juggling would have confused me
no end, a bit of refactoring happens in the process - we know where to
find the ops if everything succeeded, so we're free to just pass regular
error codes around up until then.

CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
CC: Hanjun Guo <hanjun.guo@linaro.org>
CC: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[lorenzo.pieralisi@arm.com: tagged __get_pci_rid __maybe_unused]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2017-08-08 15:44:27 +01:00
..
gtdt.c acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver 2017-04-19 17:00:15 +01:00
iort.c ACPI/IORT: Handle PCI aliases properly for IOMMUs 2017-08-08 15:44:27 +01:00
Kconfig acpi/arm64: Add GTDT table parse driver 2017-04-19 16:11:49 +01:00
Makefile acpi/arm64: Add GTDT table parse driver 2017-04-19 16:11:49 +01:00