Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752880AbbGOPAT (ORCPT ); Wed, 15 Jul 2015 11:00:19 -0400 Received: from [193.47.165.129] ([193.47.165.129]:59605 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751611AbbGOPAR (ORCPT ); Wed, 15 Jul 2015 11:00:17 -0400 From: Haggai Eran To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Haggai Eran , Dan Williams , Joerg Roedel , Vinod Koul , Russell King , James Bottomley , Florian Fainelli , Sebastian Ott , Jiri Kosina , Horia Geanta Subject: [PATCH] dma-debug: skip debug_dma_assert_idle() when disabled Date: Wed, 15 Jul 2015 17:59:33 +0300 Message-Id: <1436972373-8159-1-git-send-email-haggaie@mellanox.com> X-Mailer: git-send-email 1.7.11.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1417 Lines: 44 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. Fixes: 0abdd7a81b7e ("dma-debug: introduce debug_dma_assert_idle()") Cc: Dan Williams Cc: Joerg Roedel Cc: Vinod Koul Cc: Russell King Cc: James Bottomley Cc: Andrew Morton Cc: Florian Fainelli Cc: Sebastian Ott Cc: Jiri Kosina Cc: Horia Geanta Signed-off-by: Haggai Eran --- lib/dma-debug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dma-debug.c b/lib/dma-debug.c index ae4b65e17e64..dace71fe41f7 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -574,6 +574,9 @@ void debug_dma_assert_idle(struct page *page) unsigned long flags; phys_addr_t cln; + if (dma_debug_disabled()) + return; + if (!page) return; -- 1.7.11.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/