Skip to content

Commit b008683

Browse files
committed
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
2 parents 59250f8 + 9e02977 commit b008683

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

kernel/dma/direct.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ static inline void dma_direct_unmap_page(struct device *dev, dma_addr_t addr,
114114
dma_direct_sync_single_for_cpu(dev, addr, size, dir);
115115

116116
if (unlikely(is_swiotlb_buffer(dev, phys)))
117-
swiotlb_tbl_unmap_single(dev, phys, size, dir, attrs);
117+
swiotlb_tbl_unmap_single(dev, phys, size, dir,
118+
attrs | DMA_ATTR_SKIP_CPU_SYNC);
118119
}
119120
#endif /* _KERNEL_DMA_DIRECT_H */

0 commit comments

Comments
 (0)