arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA
authorWill Deacon <will.deacon@arm.com>
Fri, 6 Jan 2017 10:49:12 +0000 (10:49 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 23 Jan 2017 15:05:40 +0000 (15:05 +0000)
commit4a8d8a14c0d08c2437cb80c05e88f6cc1ca3fb2c
tree1953df0df4a31478e6f95957b987903e405e45d9
parent829d2bd1339220b742e5e61a5f1975eb6f74cad3
arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA

The arm64 DMA-mapping implementation sets the DMA ops to the IOMMU DMA
ops if we detect that an IOMMU is present for the master and the DMA
ranges are valid.

In the case when the IOMMU domain for the device is not of type
IOMMU_DOMAIN_DMA, then we have no business swizzling the ops, since
we're not in control of the underlying address space. This patch leaves
the DMA ops alone for masters attached to non-DMA IOMMU domains.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/dma-mapping.c