Path: blob/master/arch/alpha/include/asm/dma-mapping.h
15126 views
#ifndef _ALPHA_DMA_MAPPING_H1#define _ALPHA_DMA_MAPPING_H23#include <linux/dma-attrs.h>45extern struct dma_map_ops *dma_ops;67static inline struct dma_map_ops *get_dma_ops(struct device *dev)8{9return dma_ops;10}1112#include <asm-generic/dma-mapping-common.h>1314static inline void *dma_alloc_coherent(struct device *dev, size_t size,15dma_addr_t *dma_handle, gfp_t gfp)16{17return get_dma_ops(dev)->alloc_coherent(dev, size, dma_handle, gfp);18}1920static inline void dma_free_coherent(struct device *dev, size_t size,21void *vaddr, dma_addr_t dma_handle)22{23get_dma_ops(dev)->free_coherent(dev, size, vaddr, dma_handle);24}2526static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)27{28return get_dma_ops(dev)->mapping_error(dev, dma_addr);29}3031static inline int dma_supported(struct device *dev, u64 mask)32{33return get_dma_ops(dev)->dma_supported(dev, mask);34}3536static inline int dma_set_mask(struct device *dev, u64 mask)37{38return get_dma_ops(dev)->set_dma_mask(dev, mask);39}4041#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)42#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)4344#define dma_cache_sync(dev, va, size, dir) ((void)0)4546#endif /* _ALPHA_DMA_MAPPING_H */474849