30 Oct, 2010

1 commit


28 Oct, 2010

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (48 commits)
    DMAENGINE: move COH901318 to arch_initcall
    dma: imx-dma: fix signedness bug
    dma/timberdale: simplify conditional
    ste_dma40: remove channel_type
    ste_dma40: remove enum for endianess
    ste_dma40: remove TIM_FOR_LINK option
    ste_dma40: move mode_opt to separate config
    ste_dma40: move channel mode to a separate field
    ste_dma40: move priority to separate field
    ste_dma40: add variable to indicate valid dma_cfg
    async_tx: make async_tx channel switching opt-in
    move async raid6 test to lib/Kconfig.debug
    dmaengine: Add Freescale i.MX1/21/27 DMA driver
    intel_mid_dma: change the slave interface
    intel_mid_dma: fix the WARN_ONs
    intel_mid_dma: Add sg list support to DMA driver
    intel_mid_dma: Allow DMAC2 to share interrupt
    intel_mid_dma: Allow IRQ sharing
    intel_mid_dma: Add runtime PM support
    DMAENGINE: define a dummy filter function for ste_dma40
    ...

    Linus Torvalds
     

27 Oct, 2010

1 commit


23 Oct, 2010

3 commits

  • After moving the PL022 driver to subsys_initcall() due to the need
    of having stuff like regulators on the other end of the SPI link,
    I noticed that the COH901318 DMA engine will get probed before
    the DMA engine, so move it to an arch_initcall().

    Signed-off-by: Linus Walleij
    Signed-off-by: Dan Williams

    Linus Walleij
     
  • mxdmac->channel was unsigned, so check (imxdmac->channel < 0) for
    failed imx_dma_request_by_prio() made no sence. Explicitly check
    signed values.
    Also, fix uninitialzed use of ret.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Sascha Hauer
    Signed-off-by: Dan Williams

    Sascha Hauer
     
  • * 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    vfs: make no_llseek the default
    vfs: don't use BKL in default_llseek
    llseek: automatically add .llseek fop
    libfs: use generic_file_llseek for simple_attr
    mac80211: disallow seeks in minstrel debug code
    lirc: make chardev nonseekable
    viotape: use noop_llseek
    raw: use explicit llseek file operations
    ibmasmfs: use generic_file_llseek
    spufs: use llseek in all file operations
    arm/omap: use generic_file_llseek in iommu_debug
    lkdtm: use generic_file_llseek in debugfs
    net/wireless: use generic_file_llseek in debugfs
    drm: use noop_llseek

    Linus Torvalds
     

20 Oct, 2010

7 commits


15 Oct, 2010

1 commit

  • All file_operations should get a .llseek operation so we can make
    nonseekable_open the default for future file operations without a
    .llseek pointer.

    The three cases that we can automatically detect are no_llseek, seq_lseek
    and default_llseek. For cases where we can we can automatically prove that
    the file offset is always ignored, we use noop_llseek, which maintains
    the current behavior of not returning an error from a seek.

    New drivers should normally not use noop_llseek but instead use no_llseek
    and call nonseekable_open at open time. Existing drivers can be converted
    to do the same when the maintainer knows for certain that no user code
    relies on calling seek on the device file.

    The generated code is often incorrectly indented and right now contains
    comments that clarify for each added line why a specific variant was
    chosen. In the version that gets submitted upstream, the comments will
    be gone and I will manually fix the indentation, because there does not
    seem to be a way to do that using coccinelle.

    Some amount of new code is currently sitting in linux-next that should get
    the same modifications, which I will do at the end of the merge window.

    Many thanks to Julia Lawall for helping me learn to write a semantic
    patch that does all this.

    ===== begin semantic patch =====
    // This adds an llseek= method to all file operations,
    // as a preparation for making no_llseek the default.
    //
    // The rules are
    // - use no_llseek explicitly if we do nonseekable_open
    // - use seq_lseek for sequential files
    // - use default_llseek if we know we access f_pos
    // - use noop_llseek if we know we don't access f_pos,
    // but we still want to allow users to call lseek
    //
    @ open1 exists @
    identifier nested_open;
    @@
    nested_open(...)
    {

    }

    @ open exists@
    identifier open_f;
    identifier i, f;
    identifier open1.nested_open;
    @@
    int open_f(struct inode *i, struct file *f)
    {

    }

    @ read disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {

    }

    @ read_no_fpos disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ write @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {

    }

    @ write_no_fpos @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ fops0 @
    identifier fops;
    @@
    struct file_operations fops = {
    ...
    };

    @ has_llseek depends on fops0 @
    identifier fops0.fops;
    identifier llseek_f;
    @@
    struct file_operations fops = {
    ...
    .llseek = llseek_f,
    ...
    };

    @ has_read depends on fops0 @
    identifier fops0.fops;
    identifier read_f;
    @@
    struct file_operations fops = {
    ...
    .read = read_f,
    ...
    };

    @ has_write depends on fops0 @
    identifier fops0.fops;
    identifier write_f;
    @@
    struct file_operations fops = {
    ...
    .write = write_f,
    ...
    };

    @ has_open depends on fops0 @
    identifier fops0.fops;
    identifier open_f;
    @@
    struct file_operations fops = {
    ...
    .open = open_f,
    ...
    };

    // use no_llseek if we call nonseekable_open
    ////////////////////////////////////////////
    @ nonseekable1 depends on !has_llseek && has_open @
    identifier fops0.fops;
    identifier nso ~= "nonseekable_open";
    @@
    struct file_operations fops = {
    ... .open = nso, ...
    +.llseek = no_llseek, /* nonseekable */
    };

    @ nonseekable2 depends on !has_llseek @
    identifier fops0.fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ... .open = open_f, ...
    +.llseek = no_llseek, /* open uses nonseekable */
    };

    // use seq_lseek for sequential files
    /////////////////////////////////////
    @ seq depends on !has_llseek @
    identifier fops0.fops;
    identifier sr ~= "seq_read";
    @@
    struct file_operations fops = {
    ... .read = sr, ...
    +.llseek = seq_lseek, /* we have seq_read */
    };

    // use default_llseek if there is a readdir
    ///////////////////////////////////////////
    @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier readdir_e;
    @@
    // any other fop is used that changes pos
    struct file_operations fops = {
    ... .readdir = readdir_e, ...
    +.llseek = default_llseek, /* readdir is present */
    };

    // use default_llseek if at least one of read/write touches f_pos
    /////////////////////////////////////////////////////////////////
    @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read.read_f;
    @@
    // read fops use offset
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = default_llseek, /* read accesses f_pos */
    };

    @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ... .write = write_f, ...
    + .llseek = default_llseek, /* write accesses f_pos */
    };

    // Use noop_llseek if neither read nor write accesses f_pos
    ///////////////////////////////////////////////////////////

    @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    identifier write_no_fpos.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ...
    .write = write_f,
    .read = read_f,
    ...
    +.llseek = noop_llseek, /* read and write both use no f_pos */
    };

    @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write_no_fpos.write_f;
    @@
    struct file_operations fops = {
    ... .write = write_f, ...
    +.llseek = noop_llseek, /* write uses no f_pos */
    };

    @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    @@
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = noop_llseek, /* read uses no f_pos */
    };

    @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    @@
    struct file_operations fops = {
    ...
    +.llseek = noop_llseek, /* no read or write fn */
    };
    ===== End semantic patch =====

    Signed-off-by: Arnd Bergmann
    Cc: Julia Lawall
    Cc: Christoph Hellwig

    Arnd Bergmann
     

14 Oct, 2010

1 commit

  • Commit 0793448 "DMAENGINE: generic channel status v2" changed the interface for
    how dma channel progress is retrieved. It inadvertently exported an internal
    helper function ioat_tx_status() instead of ioat_dma_tx_status(). The latter
    polls the hardware to get the latest completion state, while the helper just
    evaluates the current state without touching hardware. The effect is that we
    end up waiting for completion timeouts or descriptor allocation errors before
    the completion state is updated.

    iperf (before fix):
    [SUM] 0.0-41.3 sec 364 MBytes 73.9 Mbits/sec

    iperf (after fix):
    [SUM] 0.0- 4.5 sec 499 MBytes 940 Mbits/sec

    This is a regression starting with 2.6.35.

    Cc:
    Cc: Dave Jiang
    Cc: Jesse Brandeburg
    Cc: Linus Walleij
    Cc: Maciej Sosnowski
    Reported-by: Richard Scobie
    Signed-off-by: Dan Williams

    Dan Williams
     

08 Oct, 2010

19 commits


06 Oct, 2010

2 commits

  • This patch adds support for the Freescale i.MX SDMA engine.

    The SDMA engine is a scatter/gather DMA engine which is implemented
    as a seperate coprocessor. SDMA needs its own firmware which is
    requested using the standard request_firmware mechanism. The firmware
    has different entry points for each peripheral type, so drivers
    have to pass the peripheral type to the DMA engine which in turn
    picks the correct firmware entry point from a table contained in
    the firmware image itself.
    The original Freescale code also supports support for transfering
    data to the internal SRAM which needs different entry points to
    the firmware. Support for this is currently not implemented. Also,
    support for the ASRC (asymmetric sample rate converter) is skipped.

    I took a very simple approach to implement dmaengine support. Only
    a single descriptor is statically assigned to a each channel. This
    means that transfers can't be queued up but only a single transfer
    is in progress. This simplifies implementation a lot and is sufficient
    for the usual device/memory transfers.

    Signed-off-by: Sascha Hauer
    Reviewed-by: Linus Walleij
    Signed-off-by: Dan Williams

    Sascha Hauer
     
  • Cyclic transfers are useful for audio where a single buffer divided
    in periods has to be transfered endlessly until stopped. After being
    prepared the transfer is started using the dma_async_descriptor->tx_submit
    function. dma_async_descriptor->callback is called after each period.
    The transfer is stopped using the DMA_TERMINATE_ALL callback.
    While being used for cyclic transfers the channel cannot be used
    for other transfer types.

    Signed-off-by: Sascha Hauer
    Cc: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Sascha Hauer
     

30 Sep, 2010

1 commit

  • This creates a DMAengine driver for the ARM PL080/PL081 PrimeCells
    based on the implementation earlier submitted by Peter Pearse.
    This is working like a charm for memcpy and slave DMA to the PL011
    PrimeCell on the PB11MPCore.

    This DMA controller is used in mostly unmodified form in the ARM
    RealView and Versatile platforms, in the ST-Ericsson Nomadik, and
    in the ST SPEAr platform.

    It has been converted to use the header from the Samsung PL080
    derivate instead of its own defintions. The Samsungs have a custom
    driver in their mach-* folders though, atleast we can share the
    register definitions.

    Cc: Peter Pearse
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Cc: Alessandro Rubini
    Acked-by: Viresh Kumar
    Signed-off-by: Linus Walleij
    [GFP_KERNEL to GFP_NOWAIT in pl08x_prep_dma_memcpy]
    Signed-off-by: Dan Williams

    Linus Walleij
     

24 Sep, 2010

1 commit

  • When using simultaneously the two DMA channels on a same engine, some
    transfers are never completed. For example, an endless lock can occur
    while writing heavily on a RAID5 array (with async-tx offload support
    enabled).

    Note that this issue can also be reproduced by using the DMA test
    client.

    On a same engine, the interrupt cause register is shared between two
    DMA channels. This patch make sure that the cause bit is only cleared
    for the requested channel.

    Signed-off-by: Simon Guinot
    Tested-by: Luc Saillard
    Acked-by: saeed bishara
    Cc:
    Signed-off-by: Dan Williams

    Simon Guinot
     

23 Sep, 2010

2 commits