History

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.

Christoph Hellwig committed 7 years ago

Commit 13bf5ce1 parent 148a97d4 files · +11 −0Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/dma-noncoherent.h+6−0
@@ -72,6 +72,12 @@ static inline void arch_sync_dma_for_cpu_all(struct device *dev) · 71 unmodified lines
72}72}
73#endif /* CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL */73#endif /* CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL */
74 74
75#ifdef CONFIG_ARCH_HAS_DMA_PREP_COHERENT
75void arch_dma_prep_coherent(struct page *page, size_t size);76void arch_dma_prep_coherent(struct page *page, size_t size);
77#else
78static 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#endif /* _LINUX_DMA_NONCOHERENT_H */83#endif /* _LINUX_DMA_NONCOHERENT_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t