From: Joerg Roedel <joerg.roedel@amd.com>
To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line
Date: Thu, 28 May 2009 17:19:30 +0200 [thread overview]
Message-ID: <1243523971-12681-4-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1243523971-12681-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>
---
lib/dma-debug.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 65043c7..7b51fa4 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -1098,3 +1098,22 @@ void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
}
EXPORT_SYMBOL(debug_dma_sync_sg_for_device);
+static int __init parse_dma_debug_driver(char *str)
+{
+ int i;
+
+ for (i = 0; i < NAME_MAX_LEN - 1; ++i, ++str) {
+ current_driver_name[i] = *str;
+ if (*str == ' ' || *str == '\t' || isspace(*str) || *str == 0)
+ break;
+ }
+ current_driver_name[i] = 0;
+
+ 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=", parse_dma_debug_driver);
--
1.6.3.1
next prev parent reply other threads:[~2009-05-28 15:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 15:19 [PATCH 0/4] dma-debug: driver filter Joerg Roedel
2009-05-28 15:19 ` [PATCH 1/4] dma-debug: add variables and checks for " Joerg Roedel
2009-06-01 21:55 ` Andrew Morton
2009-06-02 8:27 ` Joerg Roedel
2009-05-28 15:19 ` [PATCH 2/4] dma-debug: add debugfs file " Joerg Roedel
2009-06-01 22:04 ` Andrew Morton
2009-06-02 8:55 ` Joerg Roedel
2009-06-02 13:33 ` Joerg Roedel
2009-05-28 15:19 ` Joerg Roedel [this message]
2009-06-01 22:08 ` [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line Andrew Morton
2009-06-02 8:57 ` Joerg Roedel
2009-05-28 15:19 ` [PATCH 4/4] dma-debug: add documentation for the driver filter Joerg Roedel
-- strict thread matches above, loose matches on Subject: below --
2009-06-02 14:36 [PATCH 0/4] dma-debug: driver filter v2 Joerg Roedel
2009-06-02 14:36 ` [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line 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=1243523971-12681-4-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--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