dma-mapping: ia64: add CONFIG_DMA_API_DEBUG support
[pandora-kernel.git] / arch / ia64 / include / asm / dma-mapping.h
index 2475c91..5a61b5c 100644 (file)
@@ -8,6 +8,7 @@
 #include <asm/machvec.h>
 #include <linux/scatterlist.h>
 #include <asm/swiotlb.h>
+#include <linux/dma-debug.h>
 
 #define ARCH_HAS_DMA_GET_REQUIRED_MASK
 
@@ -24,13 +25,18 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
                                       dma_addr_t *daddr, gfp_t gfp)
 {
        struct dma_map_ops *ops = platform_dma_get_ops(dev);
-       return ops->alloc_coherent(dev, size, daddr, gfp);
+       void *caddr;
+
+       caddr = ops->alloc_coherent(dev, size, daddr, gfp);
+       debug_dma_alloc_coherent(dev, size, *daddr, caddr);
+       return caddr;
 }
 
 static inline void dma_free_coherent(struct device *dev, size_t size,
                                     void *caddr, dma_addr_t daddr)
 {
        struct dma_map_ops *ops = platform_dma_get_ops(dev);
+       debug_dma_free_coherent(dev, size, caddr, daddr);
        ops->free_coherent(dev, size, caddr, daddr);
 }