mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 11:48:58 -04:00
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>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -108,6 +108,14 @@ static inline void arch_dma_prep_coherent(struct page *page, size_t size)
|
||||
}
|
||||
#endif /* CONFIG_ARCH_HAS_DMA_PREP_COHERENT */
|
||||
|
||||
#ifdef CONFIG_ARCH_HAS_DMA_MARK_CLEAN
|
||||
void arch_dma_mark_clean(phys_addr_t paddr, size_t size);
|
||||
#else
|
||||
static inline void arch_dma_mark_clean(phys_addr_t paddr, size_t size)
|
||||
{
|
||||
}
|
||||
#endif /* ARCH_HAS_DMA_MARK_CLEAN */
|
||||
|
||||
void *arch_dma_set_uncached(void *addr, size_t size);
|
||||
void arch_dma_clear_uncached(void *addr, size_t size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user