diff options
author | Robin Murphy <robin.murphy@arm.com> | 2018-09-12 17:24:14 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-09-25 10:23:16 +0200 |
commit | 7adb562c3e90f87b0da196c372afe251ad4ec62e (patch) | |
tree | 5b2e10c8ec384fc92ef5f80dab41fbf86675690d /drivers/iommu/iommu.c | |
parent | iommu/dma: Use fast DMA domain lookup (diff) | |
download | linux-7adb562c3e90f87b0da196c372afe251ad4ec62e.tar.xz linux-7adb562c3e90f87b0da196c372afe251ad4ec62e.zip |
arm64/dma-mapping: Mildly optimise non-coherent IOMMU ops
Whilst the symmetry of deferring to the existing sync callback in
__iommu_map_page() is nice, taking a round-trip through
iommu_iova_to_phys() is a pretty heavyweight way to get an address we
can trivially compute from the page we already have. Tweaking it to just
perform the cache maintenance directly when appropriate doesn't really
make the code any more complicated, and the runtime efficiency gain can
only be a benefit.
Furthermore, the sync operations themselves know they can only be
invoked on a managed DMA ops domain, so can use the fast specific domain
lookup to avoid excessive manipulation of the group refcount
(particularly in the scatterlist cases).
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
0 files changed, 0 insertions, 0 deletions