diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-09 08:19:54 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-03-05 14:35:18 -0500 |
commit | 972aa45ceaf65376f33aa75958fcaefc9e752fa4 (patch) | |
tree | ffed83c13c7c0e27f39efe0c0cc81f2c9e6c72c6 /include/linux/dma-debug.h | |
parent | f62bc980e6fd26434012c0d5676ecb17179d9ee4 (diff) |
dma-debug: add add checking for map/unmap_sg
Impact: add debug callbacks for dma_{un}map_sg
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 65f73526ba2c..ee9fdb328549 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | 24 | ||
25 | struct device; | 25 | struct device; |
26 | struct scatterlist; | ||
26 | 27 | ||
27 | #ifdef CONFIG_DMA_API_DEBUG | 28 | #ifdef CONFIG_DMA_API_DEBUG |
28 | 29 | ||
@@ -36,6 +37,11 @@ extern void debug_dma_map_page(struct device *dev, struct page *page, | |||
36 | extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, | 37 | extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, |
37 | size_t size, int direction, bool map_single); | 38 | size_t size, int direction, bool map_single); |
38 | 39 | ||
40 | extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | ||
41 | int nents, int mapped_ents, int direction); | ||
42 | |||
43 | extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, | ||
44 | int nelems, int dir); | ||
39 | 45 | ||
40 | #else /* CONFIG_DMA_API_DEBUG */ | 46 | #else /* CONFIG_DMA_API_DEBUG */ |
41 | 47 | ||
@@ -56,6 +62,16 @@ static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, | |||
56 | { | 62 | { |
57 | } | 63 | } |
58 | 64 | ||
65 | static inline void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | ||
66 | int nents, int mapped_ents, int direction) | ||
67 | { | ||
68 | } | ||
69 | |||
70 | static inline void debug_dma_unmap_sg(struct device *dev, | ||
71 | struct scatterlist *sglist, | ||
72 | int nelems, int dir) | ||
73 | { | ||
74 | } | ||
59 | 75 | ||
60 | #endif /* CONFIG_DMA_API_DEBUG */ | 76 | #endif /* CONFIG_DMA_API_DEBUG */ |
61 | 77 | ||