Skip to content
Snippets Groups Projects
Commit ee9d4097 authored by David Stevens's avatar David Stevens Committed by Joerg Roedel
Browse files

iommu/dma: Skip extra sync during unmap w/swiotlb


Calling the iommu_dma_sync_*_for_cpu functions during unmap can cause
two copies out of the swiotlb buffer. Do the arch sync directly in
__iommu_dma_unmap_swiotlb instead to avoid this. This makes the call to
iommu_dma_sync_sg_for_cpu for untrusted devices in iommu_dma_unmap_sg no
longer necessary, so move that invocation later in the function.

Signed-off-by: default avatarDavid Stevens <stevensd@chromium.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20210929023300.335969-4-stevensd@google.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 06e62034
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment