diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/Kconfig | 1 | ||||
-rw-r--r-- | arch/ia64/include/asm/dma-mapping.h | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 294a3b13ecac..170042b420d4 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -28,6 +28,7 @@ config IA64 | |||
28 | select HAVE_DMA_ATTRS | 28 | select HAVE_DMA_ATTRS |
29 | select HAVE_KVM | 29 | select HAVE_KVM |
30 | select HAVE_ARCH_TRACEHOOK | 30 | select HAVE_ARCH_TRACEHOOK |
31 | select HAVE_DMA_API_DEBUG | ||
31 | default y | 32 | default y |
32 | help | 33 | help |
33 | The Itanium Processor Family is Intel's 64-bit successor to | 34 | The Itanium Processor Family is Intel's 64-bit successor to |
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index 2475c91adc98..5a61b5c2e18f 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <asm/machvec.h> | 8 | #include <asm/machvec.h> |
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | #include <asm/swiotlb.h> | 10 | #include <asm/swiotlb.h> |
11 | #include <linux/dma-debug.h> | ||
11 | 12 | ||
12 | #define ARCH_HAS_DMA_GET_REQUIRED_MASK | 13 | #define ARCH_HAS_DMA_GET_REQUIRED_MASK |
13 | 14 | ||
@@ -24,13 +25,18 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size, | |||
24 | dma_addr_t *daddr, gfp_t gfp) | 25 | dma_addr_t *daddr, gfp_t gfp) |
25 | { | 26 | { |
26 | struct dma_map_ops *ops = platform_dma_get_ops(dev); | 27 | struct dma_map_ops *ops = platform_dma_get_ops(dev); |
27 | return ops->alloc_coherent(dev, size, daddr, gfp); | 28 | void *caddr; |
29 | |||
30 | caddr = ops->alloc_coherent(dev, size, daddr, gfp); | ||
31 | debug_dma_alloc_coherent(dev, size, *daddr, caddr); | ||
32 | return caddr; | ||
28 | } | 33 | } |
29 | 34 | ||
30 | static inline void dma_free_coherent(struct device *dev, size_t size, | 35 | static inline void dma_free_coherent(struct device *dev, size_t size, |
31 | void *caddr, dma_addr_t daddr) | 36 | void *caddr, dma_addr_t daddr) |
32 | { | 37 | { |
33 | struct dma_map_ops *ops = platform_dma_get_ops(dev); | 38 | struct dma_map_ops *ops = platform_dma_get_ops(dev); |
39 | debug_dma_free_coherent(dev, size, caddr, daddr); | ||
34 | ops->free_coherent(dev, size, caddr, daddr); | 40 | ops->free_coherent(dev, size, caddr, daddr); |
35 | } | 41 | } |
36 | 42 | ||