summaryrefslogtreecommitdiff
path: root/include/linux/dma-debug.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-01-09 14:19:54 +0100
committerJoerg Roedel <joerg.roedel@amd.com>2009-03-05 20:35:18 +0100
commit972aa45ceaf65376f33aa75958fcaefc9e752fa4 (patch)
treeffed83c13c7c0e27f39efe0c0cc81f2c9e6c72c6 /include/linux/dma-debug.h
parentf62bc980e6fd26434012c0d5676ecb17179d9ee4 (diff)
downloadlinux-3.10-972aa45ceaf65376f33aa75958fcaefc9e752fa4.tar.gz
linux-3.10-972aa45ceaf65376f33aa75958fcaefc9e752fa4.tar.bz2
linux-3.10-972aa45ceaf65376f33aa75958fcaefc9e752fa4.zip
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.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h
index 65f73526ba2..ee9fdb32854 100644
--- a/include/linux/dma-debug.h
+++ b/include/linux/dma-debug.h
@@ -23,6 +23,7 @@
#include <linux/types.h>
struct device;
+struct scatterlist;
#ifdef CONFIG_DMA_API_DEBUG
@@ -36,6 +37,11 @@ extern void debug_dma_map_page(struct device *dev, struct page *page,
extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr,
size_t size, int direction, bool map_single);
+extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg,
+ int nents, int mapped_ents, int direction);
+
+extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist,
+ int nelems, int dir);
#else /* CONFIG_DMA_API_DEBUG */
@@ -56,6 +62,16 @@ static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr,
{
}
+static inline void debug_dma_map_sg(struct device *dev, struct scatterlist *sg,
+ int nents, int mapped_ents, int direction)
+{
+}
+
+static inline void debug_dma_unmap_sg(struct device *dev,
+ struct scatterlist *sglist,
+ int nelems, int dir)
+{
+}
#endif /* CONFIG_DMA_API_DEBUG */