From: Joerg Roedel <joerg.roedel@amd.com>
To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line
Date: Tue, 2 Jun 2009 16:36:43 +0200 [thread overview]
Message-ID: <1243953404-31799-4-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1243953404-31799-1-git-send-email-joerg.roedel@amd.com>
This patch add the dma_debug_driver= boot parameter to enable the driver
filter for early boot.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
Documentation/kernel-parameters.txt | 7 +++++++
lib/dma-debug.c | 18 ++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e87bdbf..b3f1314 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -646,6 +646,13 @@ and is between 256 and 4096 characters. It is defined in the file
DMA-API debugging code disables itself because the
architectural default is too low.
+ dma_debug_driver=<driver_name>
+ With this option the DMA-API debugging driver
+ filter feature can be enabled at boot time. Just
+ pass the driver to filter for as the parameter.
+ The filter can be disabled or changed to another
+ driver later using sysfs.
+
dscc4.setup= [NET]
dtc3181e= [HW,SCSI]
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index c6330b1..d0618aa 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -1109,3 +1109,21 @@ void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
}
EXPORT_SYMBOL(debug_dma_sync_sg_for_device);
+static int __init dma_debug_driver_setup(char *str)
+{
+ int i;
+
+ for (i = 0; i < NAME_MAX_LEN - 1; ++i, ++str) {
+ current_driver_name[i] = *str;
+ if (*str == 0)
+ break;
+ }
+
+ if (current_driver_name[0])
+ printk(KERN_INFO "DMA-API: enable driver filter for "
+ "driver [%s]\n", current_driver_name);
+
+
+ return 1;
+}
+__setup("dma_debug_driver=", dma_debug_driver_setup);
--
1.6.3.1
next prev parent reply other threads:[~2009-06-02 14:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 14:36 [PATCH 0/4] dma-debug: driver filter v2 Joerg Roedel
2009-06-02 14:36 ` [PATCH 1/4] dma-debug: add variables and checks for driver filter Joerg Roedel
2009-06-02 14:36 ` [PATCH 2/4] dma-debug: add debugfs file " Joerg Roedel
2009-06-02 14:36 ` Joerg Roedel [this message]
2009-06-02 14:36 ` [PATCH 4/4] dma-debug: add documentation for the " Joerg Roedel
-- strict thread matches above, loose matches on Subject: below --
2009-05-28 15:19 [PATCH 0/4] dma-debug: " Joerg Roedel
2009-05-28 15:19 ` [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line Joerg Roedel
2009-06-01 22:08 ` Andrew Morton
2009-06-02 8:57 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243953404-31799-4-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=akpm@linux-foundation.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox