path: root/arch/microblaze
diff options
authorChristoph Hellwig <>2015-09-09 15:39:53 -0700
committerLinus Torvalds <>2015-09-10 13:29:01 -0700
commit452e06af1f0149b01201f94264d452cd7a95db7a (patch)
treec8bae903b45001869d4565c73d32a601e06070cf /arch/microblaze
parentee196371d5cb1942ebdccc16bdce389812aa265e (diff)
dma-mapping: consolidate dma_set_mask
Almost everyone implements dma_set_mask the same way, although some time that's hidden in ->set_dma_mask methods. This patch consolidates those into a common implementation that either calls ->set_dma_mask if present or otherwise uses the default implementation. Some architectures used to only call ->set_dma_mask after the initial checks, and those instance have been fixed to do the full work. h8300 implemented dma_set_mask bogusly as a no-ops and has been fixed. Unfortunately some architectures overload unrelated semantics like changing the dma_ops into it so we still need to allow for an architecture override for now. [ 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/microblaze')
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h
index 3b453c503a43..24b12970c9cf 100644
--- a/arch/microblaze/include/asm/dma-mapping.h
+++ b/arch/microblaze/include/asm/dma-mapping.h
@@ -46,20 +46,6 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
#include <asm-generic/dma-mapping-common.h>
-static inline int dma_set_mask(struct device *dev, u64 dma_mask)
- struct dma_map_ops *ops = get_dma_ops(dev);
- if (unlikely(ops == NULL))
- return -EIO;
- if (ops->set_dma_mask)
- return ops->set_dma_mask(dev, dma_mask);
- if (!dev->dma_mask || !dma_supported(dev, dma_mask))
- return -EIO;
- *dev->dma_mask = dma_mask;
- return 0;
static inline void __dma_sync(unsigned long paddr,
size_t size, enum dma_data_direction direction)