Re: [PATCH v4 3/6] dma-iommu: skip extra sync during unmap w/swiotlb

2021-08-13 Thread Christoph Hellwig
Same comment as for the previous one - please split the actual bug fix from the code movement. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH v4 3/6] dma-iommu: skip extra sync during unmap w/swiotlb

2021-08-13 Thread David Stevens
From: David Stevens Calling the iommu_dma_sync_*_for_cpu functions during unmap can cause two copies out of the swiotlb buffer. Fold __iommu_dma_unmap_swiotlb into iommu_dma_unmap_page, and directly call arch_sync_dma_for_cpu instead of iommu_dma_sync_single_for_cpu to avoid this double sync.