diff options
author | Christoph Hellwig <hch@lst.de> | 2019-01-07 13:36:20 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-02-13 19:12:33 +0100 |
commit | 347cb6af8710b72cf9685fdc09d07873cf42d51f (patch) | |
tree | 37927e976037dcea2141aef10cba34efe58d2655 /include/linux/dma-mapping.h | |
parent | 70ca7ba2dbe4f1858b85e30269c8408a8bb8f272 (diff) | |
download | lwn-347cb6af8710b72cf9685fdc09d07873cf42d51f.tar.gz lwn-347cb6af8710b72cf9685fdc09d07873cf42d51f.zip |
dma-mapping: add a kconfig symbol for arch_setup_dma_ops availability
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul Burton <paul.burton@mips.com> # MIPS
Acked-by: Catalin Marinas <catalin.marinas@arm.com> # arm64
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r-- | include/linux/dma-mapping.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index b904d55247ab..2b20d60e6158 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -671,11 +671,15 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask) return dma_set_mask_and_coherent(dev, mask); } -#ifndef arch_setup_dma_ops +#ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS +void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, + const struct iommu_ops *iommu, bool coherent); +#else static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base, - u64 size, const struct iommu_ops *iommu, - bool coherent) { } -#endif + u64 size, const struct iommu_ops *iommu, bool coherent) +{ +} +#endif /* CONFIG_ARCH_HAS_SETUP_DMA_OPS */ #ifndef arch_teardown_dma_ops static inline void arch_teardown_dma_ops(struct device *dev) { } |