diff options
author | Christoph Hellwig <hch@lst.de> | 2019-03-25 17:44:06 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-05-06 16:04:40 +0300 |
commit | 13bf5ced93775ffccb53527a9d862e023a9daa03 (patch) | |
tree | 8841a56889a7b6468e7c81215428376358345211 /include/linux/dma-noncoherent.h | |
parent | 148a97d5a02a62f81b5d6176f871c94a65e1f3af (diff) | |
download | linux-13bf5ced93775ffccb53527a9d862e023a9daa03.tar.xz |
dma-mapping: add a Kconfig symbol to indicate arch_dma_prep_coherent presence
Add a Kconfig symbol that indicates an architecture provides a
arch_dma_prep_coherent implementation, and provide a stub otherwise.
This will allow the generic dma-iommu code to use it while still
allowing to be built for cache coherent architectures.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'include/linux/dma-noncoherent.h')
-rw-r--r-- | include/linux/dma-noncoherent.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h index 69b36ed31a99..9741767e400f 100644 --- a/include/linux/dma-noncoherent.h +++ b/include/linux/dma-noncoherent.h @@ -72,6 +72,12 @@ static inline void arch_sync_dma_for_cpu_all(struct device *dev) } #endif /* CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL */ +#ifdef CONFIG_ARCH_HAS_DMA_PREP_COHERENT void arch_dma_prep_coherent(struct page *page, size_t size); +#else +static inline void arch_dma_prep_coherent(struct page *page, size_t size) +{ +} +#endif /* CONFIG_ARCH_HAS_DMA_PREP_COHERENT */ #endif /* _LINUX_DMA_NONCOHERENT_H */ |