aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/dma-mapping.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-01-07 13:36:20 -0500
committerChristoph Hellwig <hch@lst.de>2019-02-13 19:12:33 +0100
commit347cb6af8710b72cf9685fdc09d07873cf42d51f (patch)
tree37927e976037dcea2141aef10cba34efe58d2655 /include/linux/dma-mapping.h
parentdma-mapping: move debug configuration options to kernel/dma (diff)
downloadwireguard-linux-347cb6af8710b72cf9685fdc09d07873cf42d51f.tar.xz
wireguard-linux-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.h12
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) { }