diff options
| author | Joerg Roedel <joerg.roedel@amd.com> | 2009-03-16 12:32:14 -0400 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-03-17 07:56:49 -0400 |
| commit | 41531c8f5f05aba5ec645d9770557eedbf75b422 (patch) | |
| tree | 7635e68efbee5ea7b5208e5d4b332f6ef2113dd3 /include/linux | |
| parent | 2e34bde18576a02c897ae6b699ea26301d92be1b (diff) | |
dma-debug: add a check dma memory leaks
Impact: allow architectures to monitor busses for dma mem leakage
This patch adds checking code to detect if a device has pending DMA
operations when it is about to be unbound from its device driver.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dma-debug.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h index 46a11c10da04..e851d23e91eb 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h | |||
| @@ -24,9 +24,12 @@ | |||
| 24 | 24 | ||
| 25 | struct device; | 25 | struct device; |
| 26 | struct scatterlist; | 26 | struct scatterlist; |
| 27 | struct bus_type; | ||
| 27 | 28 | ||
| 28 | #ifdef CONFIG_DMA_API_DEBUG | 29 | #ifdef CONFIG_DMA_API_DEBUG |
| 29 | 30 | ||
| 31 | extern void dma_debug_add_bus(struct bus_type *bus); | ||
| 32 | |||
| 30 | extern void dma_debug_init(u32 num_entries); | 33 | extern void dma_debug_init(u32 num_entries); |
| 31 | 34 | ||
| 32 | extern void debug_dma_map_page(struct device *dev, struct page *page, | 35 | extern void debug_dma_map_page(struct device *dev, struct page *page, |
| @@ -80,6 +83,10 @@ extern void debug_dma_dump_mappings(struct device *dev); | |||
| 80 | 83 | ||
| 81 | #else /* CONFIG_DMA_API_DEBUG */ | 84 | #else /* CONFIG_DMA_API_DEBUG */ |
| 82 | 85 | ||
| 86 | void dma_debug_add_bus(struct bus_type *bus) | ||
| 87 | { | ||
| 88 | } | ||
| 89 | |||
| 83 | static inline void dma_debug_init(u32 num_entries) | 90 | static inline void dma_debug_init(u32 num_entries) |
| 84 | { | 91 | { |
| 85 | } | 92 | } |
