From patchwork Fri Jan 9 16:19:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 17539 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 775FE4750F for ; Sat, 10 Jan 2009 03:21:24 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753402AbZAIQUt (ORCPT ); Fri, 9 Jan 2009 11:20:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753329AbZAIQUo (ORCPT ); Fri, 9 Jan 2009 11:20:44 -0500 Received: from outbound-wa4.frontbridge.com ([216.32.181.16]:32087 "EHLO WA4EHSOBE002.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752137AbZAIQTo (ORCPT ); Fri, 9 Jan 2009 11:19:44 -0500 Received: from mail99-wa4-R.bigfish.com (10.8.14.249) by WA4EHSOBE002.bigfish.com (10.8.40.22) with Microsoft SMTP Server id 8.1.291.1; Fri, 9 Jan 2009 16:19:43 +0000 Received: from mail99-wa4 (localhost.localdomain [127.0.0.1]) by mail99-wa4-R.bigfish.com (Postfix) with ESMTP id 1EB9A17F833A; Fri, 9 Jan 2009 16:19:43 +0000 (UTC) X-BigFish: VPS3(zzzzzzz32i43j66h) X-Spam-TCS-SCL: 5:0 X-FB-SS: 5, Received: by mail99-wa4 (MessageSwitch) id 1231517981645435_28223; Fri, 9 Jan 2009 16:19:41 +0000 (UCT) Received: from svlb1extmailp02.amd.com (unknown [139.95.251.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail99-wa4.bigfish.com (Postfix) with ESMTP id 8D01FB0064; Fri, 9 Jan 2009 16:19:41 +0000 (UTC) Received: from svlb1twp01.amd.com ([139.95.250.34]) by svlb1extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n09GJWmW004145; Fri, 9 Jan 2009 08:19:35 -0800 X-WSS-ID: 0KD7PCH-03-IWV-01 Received: from SSVLEXBH1.amd.com (ssvlexbh1.amd.com [139.95.53.182]) by svlb1twp01.amd.com (Tumbleweed MailGate 3.5.1) with ESMTP id 29F20884956; Fri, 9 Jan 2009 08:19:28 -0800 (PST) Received: from SSVLEXMB1.amd.com ([139.95.53.181]) by SSVLEXBH1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 Jan 2009 08:19:34 -0800 Received: from SF36EXMB1.amd.com ([172.19.4.24]) by SSVLEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 Jan 2009 08:19:33 -0800 Received: from lemmy.localdomain ([165.204.77.20]) by SF36EXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 Jan 2009 17:19:30 +0100 Received: by lemmy.localdomain (Postfix, from userid 41430) id 8711D53AF3; Fri, 9 Jan 2009 17:19:30 +0100 (CET) From: Joerg Roedel To: linux-kernel@vger.kernel.org CC: mingo@redhat.com, dwmw2@infradead.org, fujita.tomonori@lab.ntt.co.jp, netdev@vger.kernel.org, iommu@lists.linux-foundation.org, Joerg Roedel Subject: [PATCH 01/16] dma-debug: add Kconfig entry Date: Fri, 9 Jan 2009 17:19:15 +0100 Message-ID: <1231517970-20288-2-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.5.6.4 In-Reply-To: <1231517970-20288-1-git-send-email-joerg.roedel@amd.com> References: <1231517970-20288-1-git-send-email-joerg.roedel@amd.com> X-OriginalArrivalTime: 09 Jan 2009 16:19:30.0574 (UTC) FILETIME=[0CF32AE0:01C97276] MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Impact: add a Kconfig entry for DMA-API debugging Signed-off-by: Joerg Roedel --- arch/Kconfig | 2 ++ lib/Kconfig.debug | 11 +++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 2e13aa2..068554c 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -103,3 +103,5 @@ config HAVE_CLK The calls support software clock gating and thus are a key power management tool on many systems. +config HAVE_DMA_API_DEBUG + bool diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 2e75478..cba5778 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -899,6 +899,17 @@ config DYNAMIC_PRINTK_DEBUG debugging for all modules. This mode can be turned off via the above disable command. +config DMA_API_DEBUG + bool "Enable debugging of DMA-API usage" + depends on HAVE_DMA_API_DEBUG + help + Enable this option to debug the use of the DMA API by device drivers. + With this option you will be able to detect common bugs in device + drivers like double-freeing of DMA mappings or freeing mappings that + were never allocated. + This option causes a performance degredation. Use only if you want + to debug device drivers. If unsure, say N. + source "samples/Kconfig" source "lib/Kconfig.kgdb"