]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:50:07 +0000 (10:50 +0200)
commitacdbd3cb6cdd3c0b43a2f0bfd48c83cc3ca02393
treeeeebcebda8ff979827af353cc7bbf9ff62629d99
parentd806b39f18dd01b8433eff98fa5b4d053767a88f
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.

BugLink: http://bugs.launchpad.net/bugs/1688158
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 4a8d8a14c0d08c2437cb80c05e88f6cc1ca3fb2c)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/arm64/mm/dma-mapping.c