mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
2e34bde185
commit
41531c8f5f
2 changed files with 62 additions and 0 deletions
|
@ -24,9 +24,12 @@
|
|||
|
||||
struct device;
|
||||
struct scatterlist;
|
||||
struct bus_type;
|
||||
|
||||
#ifdef CONFIG_DMA_API_DEBUG
|
||||
|
||||
extern void dma_debug_add_bus(struct bus_type *bus);
|
||||
|
||||
extern void dma_debug_init(u32 num_entries);
|
||||
|
||||
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);
|
|||
|
||||
#else /* CONFIG_DMA_API_DEBUG */
|
||||
|
||||
void dma_debug_add_bus(struct bus_type *bus)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void dma_debug_init(u32 num_entries)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue