diff options
author | Linus Torvalds | 2022-04-16 11:20:21 -0700 |
---|---|---|
committer | Linus Torvalds | 2022-04-16 11:20:21 -0700 |
commit | b00868396dbd23bb6875f4096b6e59e1b17d67de (patch) | |
tree | 9e4470414e2a6f811abc4322e573fea188124893 /kernel | |
parent | 59250f8a7f3a60a2661b84cbafc1e0eb5d05ec9b (diff) | |
parent | 9e02977bfad006af328add9434c8bffa40e053bb (diff) |
Merge tag 'dma-mapping-5.18-2' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fix from Christoph Hellwig:
- avoid a double memory copy for swiotlb (Chao Gao)
* tag 'dma-mapping-5.18-2' of git://git.infradead.org/users/hch/dma-mapping:
dma-direct: avoid redundant memory sync for swiotlb
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/dma/direct.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72e..8a6cd53dbe8c 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -114,6 +114,7 @@ static inline void dma_direct_unmap_page(struct device *dev, dma_addr_t addr, dma_direct_sync_single_for_cpu(dev, addr, size, dir); if (unlikely(is_swiotlb_buffer(dev, phys))) - swiotlb_tbl_unmap_single(dev, phys, size, dir, attrs); + swiotlb_tbl_unmap_single(dev, phys, size, dir, + attrs | DMA_ATTR_SKIP_CPU_SYNC); } #endif /* _KERNEL_DMA_DIRECT_H */ |