aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/dma-mapping.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/dma-mapping.h')
-rw-r--r--arch/mips/include/asm/dma-mapping.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
index 7aa37ddfca4b..be39a12901c6 100644
--- a/arch/mips/include/asm/dma-mapping.h
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -57,25 +57,31 @@ dma_set_mask(struct device *dev, u64 mask)
57extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 57extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
58 enum dma_data_direction direction); 58 enum dma_data_direction direction);
59 59
60static inline void *dma_alloc_coherent(struct device *dev, size_t size, 60#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
61 dma_addr_t *dma_handle, gfp_t gfp) 61
62static inline void *dma_alloc_attrs(struct device *dev, size_t size,
63 dma_addr_t *dma_handle, gfp_t gfp,
64 struct dma_attrs *attrs)
62{ 65{
63 void *ret; 66 void *ret;
64 struct dma_map_ops *ops = get_dma_ops(dev); 67 struct dma_map_ops *ops = get_dma_ops(dev);
65 68
66 ret = ops->alloc_coherent(dev, size, dma_handle, gfp); 69 ret = ops->alloc(dev, size, dma_handle, gfp, attrs);
67 70
68 debug_dma_alloc_coherent(dev, size, *dma_handle, ret); 71 debug_dma_alloc_coherent(dev, size, *dma_handle, ret);
69 72
70 return ret; 73 return ret;
71} 74}
72 75
73static inline void dma_free_coherent(struct device *dev, size_t size, 76#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
74 void *vaddr, dma_addr_t dma_handle) 77
78static inline void dma_free_attrs(struct device *dev, size_t size,
79 void *vaddr, dma_addr_t dma_handle,
80 struct dma_attrs *attrs)
75{ 81{
76 struct dma_map_ops *ops = get_dma_ops(dev); 82 struct dma_map_ops *ops = get_dma_ops(dev);
77 83
78 ops->free_coherent(dev, size, vaddr, dma_handle); 84 ops->free(dev, size, vaddr, dma_handle, attrs);
79 85
80 debug_dma_free_coherent(dev, size, vaddr, dma_handle); 86 debug_dma_free_coherent(dev, size, vaddr, dma_handle);
81} 87}