]> asedeno.scripts.mit.edu Git - linux.git/commit
iommu/of: Handle PCI aliases properly
authorRobin Murphy <robin.murphy@arm.com>
Wed, 31 May 2017 17:52:29 +0000 (18:52 +0100)
committerJoerg Roedel <jroedel@suse.de>
Wed, 26 Jul 2017 09:11:57 +0000 (11:11 +0200)
commitd87beb749281404b4b4919930b1cc6352e3746f2
tree167df03dd845a95e9adc57077703004d3f90c87d
parent520eccdfe187591a51ea9ab4c1a024ae4d0f68d9
iommu/of: Handle PCI aliases properly

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 the OF code by translating every RID
produced by the alias walk, not just whichever one comes out last.
Happily, this also makes things tidy enough that we can reduce the
number of both total lines of code, and confusing levels of indirection,
by pulling the "iommus"/"iommu-map" parsing helpers back in-line again.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/of_iommu.c