summaryrefslogtreecommitdiff
path: root/include/linux/dma-direct.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-08-17 16:41:50 +0200
committerChristoph Hellwig <hch@lst.de>2020-09-11 09:10:17 +0200
commitabdaf11ac18925ce8cc229e62e35b342d548ece2 (patch)
treec32d6fd1625f6835947ca94130ca0942ef47ad01 /include/linux/dma-direct.h
parentef1a85b6ca093abb00fbc38ea55fd9ae08ab05ef (diff)
dma-mapping: add (back) arch_dma_mark_clean for ia64
Add back a hook to optimize dcache flushing after reading executable code using DMA. This gets ia64 out of the business of pretending to be dma incoherent just for this optimization. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/dma-direct.h')
-rw-r--r--include/linux/dma-direct.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h
index 6e87225600ae..95e3e28bd93f 100644
--- a/include/linux/dma-direct.h
+++ b/include/linux/dma-direct.h
@@ -150,6 +150,9 @@ static inline void dma_direct_sync_single_for_cpu(struct device *dev,
if (unlikely(is_swiotlb_buffer(paddr)))
swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_CPU);
+
+ if (dir == DMA_FROM_DEVICE)
+ arch_dma_mark_clean(paddr, size);
}
static inline dma_addr_t dma_direct_map_page(struct device *dev,