summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-05-22 21:49:51 +0200
committerJoerg Roedel <joerg.roedel@amd.com>2009-06-02 16:21:41 +0200
commit1745de5e5639457513fe43440f2800e23c3cbc7d (patch)
tree0323bd8756c0b42060724ce282facce2a885c9a2 /lib
parent8a6fc708b9bb48a79a385bdc2be0959ee2ab788d (diff)
downloadlinux-1745de5e5639457513fe43440f2800e23c3cbc7d.tar.gz
linux-1745de5e5639457513fe43440f2800e23c3cbc7d.tar.bz2
linux-1745de5e5639457513fe43440f2800e23c3cbc7d.zip
dma-debug: add dma_debug_driver kernel command line
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/dma-debug.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index c6330b1a7be7..d0618aa13b49 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);