• Robin Murphy's avatar
    arm64/dma-mapping: Mildly optimise non-coherent IOMMU ops · 7adb562c
    Robin Murphy authored
    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: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Tested-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    7adb562c
dma-mapping.c 23.6 KB