diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-09 08:38:50 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-03-05 14:35:19 -0500 |
commit | 6bfd4498764d6201399849d2e80fda95db7742c0 (patch) | |
tree | 71675d02878324a82036e75d3bd0e0457a33e12b /include/linux/dma-debug.h | |
parent | 972aa45ceaf65376f33aa75958fcaefc9e752fa4 (diff) |
dma-debug: add checking for [alloc|free]_coherent
Impact: add debug callbacks for dma_[alloc|free]_coherent
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include/linux/dma-debug.h')
-rw-r--r-- | include/linux/dma-debug.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h index ee9fdb328549..cb72dfd87326 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h | |||
@@ -43,6 +43,12 @@ extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | |||
43 | extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, | 43 | extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, |
44 | int nelems, int dir); | 44 | int nelems, int dir); |
45 | 45 | ||
46 | extern void debug_dma_alloc_coherent(struct device *dev, size_t size, | ||
47 | dma_addr_t dma_addr, void *virt); | ||
48 | |||
49 | extern void debug_dma_free_coherent(struct device *dev, size_t size, | ||
50 | void *virt, dma_addr_t addr); | ||
51 | |||
46 | #else /* CONFIG_DMA_API_DEBUG */ | 52 | #else /* CONFIG_DMA_API_DEBUG */ |
47 | 53 | ||
48 | static inline void dma_debug_init(u32 num_entries) | 54 | static inline void dma_debug_init(u32 num_entries) |
@@ -73,6 +79,16 @@ static inline void debug_dma_unmap_sg(struct device *dev, | |||
73 | { | 79 | { |
74 | } | 80 | } |
75 | 81 | ||
82 | static inline void debug_dma_alloc_coherent(struct device *dev, size_t size, | ||
83 | dma_addr_t dma_addr, void *virt) | ||
84 | { | ||
85 | } | ||
86 | |||
87 | static inline void debug_dma_free_coherent(struct device *dev, size_t size, | ||
88 | void *virt, dma_addr_t addr) | ||
89 | { | ||
90 | } | ||
91 | |||
76 | #endif /* CONFIG_DMA_API_DEBUG */ | 92 | #endif /* CONFIG_DMA_API_DEBUG */ |
77 | 93 | ||
78 | #endif /* __DMA_DEBUG_H */ | 94 | #endif /* __DMA_DEBUG_H */ |