path: root/arch/x86/include/asm/dma-mapping.h
diff options
authorChristoph Hellwig <>2015-09-09 15:39:49 -0700
committerLinus Torvalds <>2015-09-10 13:29:01 -0700
commitee196371d5cb1942ebdccc16bdce389812aa265e (patch)
tree59d8b00098bf929a6bb093c78e239cf265632922 /arch/x86/include/asm/dma-mapping.h
parentefa21e432c7b3c8ae976039d614a017799b6e874 (diff)
dma-mapping: consolidate dma_supported
Most architectures just call into ->dma_supported, but some also return 1 if the method is not present, or 0 if no dma ops are present (although that should never happeb). Consolidate this more broad version into common code. Also fix h8300 which inorrectly always returned 0, which would have been a problem if it's dma_set_mask implementation wasn't a similarly buggy noop. As a few architectures have much more elaborate implementations, we still allow for arch overrides. [ fix xtensa] Signed-off-by: Christoph Hellwig <> Cc: Arnd Bergmann <> Cc: Russell King <> Cc: Catalin Marinas <> Cc: Will Deacon <> Cc: Yoshinori Sato <> Cc: Michal Simek <> Cc: Jonas Bonn <> Cc: Chris Metcalf <> Cc: Guan Xuetao <> Cc: Ralf Baechle <> Cc: Benjamin Herrenschmidt <> Cc: Ingo Molnar <> Cc: Thomas Gleixner <> Cc: "H. Peter Anvin" <> Cc: Andy Shevchenko <> Signed-off-by: Max Filippov <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'arch/x86/include/asm/dma-mapping.h')
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index bbca62e3e43f..b1fbf582048b 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -43,9 +43,11 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp);
#define arch_dma_alloc_attrs arch_dma_alloc_attrs
+extern int dma_supported(struct device *hwdev, u64 mask);
#include <asm-generic/dma-mapping-common.h>
-extern int dma_supported(struct device *hwdev, u64 mask);
extern int dma_set_mask(struct device *dev, u64 mask);
extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,