lkml.org 
[lkml]   [2009]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/4] dma-debug: add dma_debug_driver kernel command line
    Date
    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



    \
     
     \ /
      Last update: 2009-05-28 17:25    [W:0.026 / U:31.324 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site