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.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -72,6 +72,12 @@ static inline void arch_sync_dma_for_cpu_all(struct device *dev) · 71 unmodified lines | ||
| 72 | 72 | } |
| 73 | 73 | #endif /* CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL */ |
| 74 | 74 | |
| 75 | +#ifdef CONFIG_ARCH_HAS_DMA_PREP_COHERENT | |
| 75 | 76 | void arch_dma_prep_coherent(struct page *page, size_t size); |
| 77 | +#else | |
| 78 | +static inline void arch_dma_prep_coherent(struct page *page, size_t size) | |
| 79 | +{ | |
| 80 | +} | |
| 81 | +#endif /* CONFIG_ARCH_HAS_DMA_PREP_COHERENT */ | |
| 76 | 82 | |
| 77 | 83 | #endif /* _LINUX_DMA_NONCOHERENT_H */ |