Skip to content

Commit c9d120b

Browse files
haggaietorvalds
authored andcommitted
dma-debug: skip debug_dma_assert_idle() when disabled
If dma-debug is disabled due to a memory error, DMA unmaps do not affect the dma_active_cacheline radix tree anymore, and debug_dma_assert_idle() can print false warnings. Disable debug_dma_assert_idle() when dma_debug_disabled() is true. Signed-off-by: Haggai Eran <[email protected]> Fixes: 0abdd7a ("dma-debug: introduce debug_dma_assert_idle()") Cc: Dan Williams <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Vinod Koul <[email protected]> Cc: Russell King <[email protected]> Cc: James Bottomley <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Sebastian Ott <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Horia Geanta <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0f70fe6 commit c9d120b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/dma-debug.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@ void debug_dma_assert_idle(struct page *page)
574574
unsigned long flags;
575575
phys_addr_t cln;
576576

577+
if (dma_debug_disabled())
578+
return;
579+
577580
if (!page)
578581
return;
579582

0 commit comments

Comments
 (0)