Re: [PATCH v3 3/5] dma-iommu: add SKIP_CPU_SYNC after syncing

2021-08-11 Thread Robin Murphy
On 2021-08-11 03:42, David Stevens wrote: From: David Stevens After syncing in map/unmap, add the DMA_ATTR_SKIP_CPU_SYNC flag so anything that uses attrs later on will skip any sync work that has already been completed. In particular, this skips copying from the swiotlb twice during unmap.

Re: [PATCH v3 3/5] dma-iommu: add SKIP_CPU_SYNC after syncing

2021-08-11 Thread Christoph Hellwig
> diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c > index 4f0cc4a0a61f..be0214b1455c 100644 > --- a/drivers/iommu/dma-iommu.c > +++ b/drivers/iommu/dma-iommu.c > @@ -859,8 +859,11 @@ static dma_addr_t iommu_dma_map_page(struct device *dev, > struct page *page, > static void

[PATCH v3 3/5] dma-iommu: add SKIP_CPU_SYNC after syncing

2021-08-10 Thread David Stevens
From: David Stevens After syncing in map/unmap, add the DMA_ATTR_SKIP_CPU_SYNC flag so anything that uses attrs later on will skip any sync work that has already been completed. In particular, this skips copying from the swiotlb twice during unmap. Signed-off-by: David Stevens ---