Commit 13bf5ced authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
parent 148a97d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ config ARM64
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_DMA_COHERENT_TO_PFN
	select ARCH_HAS_DMA_MMAP_PGPROT
	select ARCH_HAS_DMA_PREP_COHERENT
	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_FAST_MULTIPLIER
+1 −0
Original line number Diff line number Diff line
config CSKY
	def_bool y
	select ARCH_32BIT_OFF_T
	select ARCH_HAS_DMA_PREP_COHERENT
	select ARCH_HAS_SYNC_DMA_FOR_CPU
	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
	select ARCH_USE_BUILTIN_BSWAP
+6 −0
Original line number Diff line number Diff line
@@ -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 */
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ config ARCH_HAS_SYNC_DMA_FOR_CPU
config ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
	bool

config ARCH_HAS_DMA_PREP_COHERENT
	bool

config ARCH_HAS_DMA_COHERENT_TO_PFN
	bool