21 May, 2008

1 commit

  • 1) Remove an explicit memset(.., 0, ...) to a variable allocated with
    kzalloc (i.e. 'dest').

    2) Allocate 'src' with kmalloc instead of kzalloc as all elements of the
    'src' buffer are initialized in a 'for(...)' loop just after.

    3) remove useless 'sizeof(u8)', which always returns 1, when computing the
    size of the memory to be allocated.

    Signed-off-by: Christophe Jaillet
    Signed-off-by: Dan Williams

    Christophe Jaillet
     

22 Apr, 2008

1 commit


18 Apr, 2008

6 commits


01 Apr, 2008

1 commit


31 Mar, 2008

2 commits


19 Mar, 2008

1 commit

  • The DMA_INTERRUPT async_tx is a NULL transfer, thus the BCR(count register)
    is 0. When the transfer started with a byte count of zero, the DMA
    controller will triger a PE(programming error) event and halt, not a normal
    interrupt. I add special codes for PE event and DMA_INTERRUPT
    async_tx testing.

    Signed-off-by: Zhang Wei
    Signed-off-by: Andrew Morton
    Signed-off-by: Dan Williams

    Zhang Wei
     

14 Mar, 2008

5 commits

  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Signed-off-by: Dan Williams

    Harvey Harrison
     
  • The patch 'fsldma: do not cleanup descriptors in hardirq context'
    (commit 222ccf9ab838a1ca7163969fabd2cddc10403fb5) removed descriptors
    cleanup function to tasklet but the completed cookie do not updated.
    Thus, the DMA controller will get lots of duplicated transfer
    interrupts. Just make a completed cookie update in interrupt handler.
    And keep other cleanup jobs in tasklet function.

    Tested-by: Sebastian Siewior
    Signed-off-by: Zhang Wei
    Signed-off-by: Dan Williams

    Zhang Wei
     
  • This is a bug that I assigned DMA_INTERRUPT capability to fsldma
    but missing device_prep_dma_interrupt function. For a bug in
    dmaengine.c the driver passed BUG_ON() checking. The patch fixes it.

    Signed-off-by: Zhang Wei
    Signed-off-by: Dan Williams

    Zhang Wei
     
  • The device->device_prep_dma_interrupt function is used by
    DMA_INTERRUPT capability, not DMA_ZERO_SUM.

    Signed-off-by: Zhang Wei
    Acked-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Zhang Wei
     
  • There are warning messages reported by Stephen Rothwell with
    ARCH=powerpc allmodconfig build:

    drivers/dma/fsldma.c: In function 'fsl_dma_prep_memcpy':
    drivers/dma/fsldma.c:439: warning: comparison of distinct pointer types
    lacks a cast
    drivers/dma/fsldma.c: In function 'fsl_chan_xfer_ld_queue':
    drivers/dma/fsldma.c:584: warning: format '%016llx' expects type 'long long
    unsigned int', but argument 4 has type 'dma_addr_t'
    drivers/dma/fsldma.c: In function 'fsl_dma_chan_do_interrupt':
    drivers/dma/fsldma.c:668: warning: format '%x' expects type 'unsigned int',
    but argument 5 has type 'dma_addr_t'
    drivers/dma/fsldma.c:684: warning: format '%016llx' expects type 'long long
    unsigned int', but argument 4 has type 'dma_addr_t'
    drivers/dma/fsldma.c:684: warning: format '%016llx' expects type 'long long
    unsigned int', but argument 5 has type 'dma_addr_t'
    drivers/dma/fsldma.c:701: warning: format '%02x' expects type 'unsigned
    int', but argument 4 has type 'dma_addr_t'
    drivers/dma/fsldma.c: In function 'fsl_dma_self_test':
    drivers/dma/fsldma.c:840: warning: format '%d' expects type 'int', but
    argument 5 has type 'size_t'
    drivers/dma/fsldma.c: In function 'of_fsl_dma_probe':
    drivers/dma/fsldma.c:1010: warning: format '%08x' expects type 'unsigned
    int', but argument 5 has type 'resource_size_t'

    This patch fixed the above warning messages.

    Signed-off-by: Zhang Wei
    Signed-off-by: Dan Williams

    Zhang Wei
     

05 Mar, 2008

3 commits

  • Initialize 'ack' to zero in case the descriptor has been recycled.

    Prevents "kernel BUG at crypto/async_tx/async_xor.c:185!"

    Signed-off-by: Dan Williams
    Acked-by: Shannon Nelson
    Cc: stable@kernel.org

    Dan Williams
     
  • "Cleaning" descriptors involves calling pending callbacks and clients
    assume that their callback will only ever happen in softirq context.
    Delay cleanup to the tasklet.

    Signed-off-by: Dan Williams
    Acked-by: Zhang Wei

    Dan Williams
     
  • The driver implements DMA engine API for Freescale MPC85xx DMA controller,
    which could be used by devices in the silicon. The driver supports the
    Basic mode of Freescale MPC85xx DMA controller. The MPC85xx processors
    supported include MPC8540/60, MPC8555, MPC8548, MPC8641 and so on.

    The MPC83xx(MPC8349, MPC8360) are also supported.

    [kamalesh@linux.vnet.ibm.com: build fix]
    [dan.j.williams@intel.com: merge mm fixes, rebase on async_tx-2.6.25]
    Signed-off-by: Zhang Wei
    Signed-off-by: Ebony Zhu
    Acked-by: Kumar Gala
    Cc: Shannon Nelson
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Dan Williams

    Zhang Wei
     

07 Feb, 2008

3 commits

  • Pass a full set of flags to drivers' per-operation 'prep' routines.
    Currently the only flag passed is DMA_PREP_INTERRUPT. The expectation is
    that arch-specific async_tx_find_channel() implementations can exploit this
    capability to find the best channel for an operation.

    Signed-off-by: Dan Williams
    Acked-by: Shannon Nelson
    Reviewed-by: Haavard Skinnemoen

    Dan Williams
     
  • The tx_set_src and tx_set_dest methods were originally implemented to allow
    an array of addresses to be passed down from async_xor to the dmaengine
    driver while minimizing stack overhead. Removing these methods allows
    drivers to have all transaction parameters available at 'prep' time, saves
    two function pointers in struct dma_async_tx_descriptor, and reduces the
    number of indirect branches..

    A consequence of moving this data to the 'prep' routine is that
    multi-source routines like async_xor need temporary storage to convert an
    array of linear addresses into an array of dma addresses. In order to keep
    the same stack footprint of the previous implementation the input array is
    reused as storage for the dma addresses. This requires that
    sizeof(dma_addr_t) be less than or equal to sizeof(void *). As a
    consequence CONFIG_DMADEVICES now depends on !CONFIG_HIGHMEM64G. It also
    requires that drivers be able to make descriptor resources available when
    the 'prep' routine is polled.

    Signed-off-by: Dan Williams
    Acked-by: Shannon Nelson

    Dan Williams
     
  • these three list_head are all local variables, but can also use LIST_HEAD.

    Signed-off-by: Denis Cheng
    Signed-off-by: Andrew Morton
    Signed-off-by: Dan Williams

    Denis Cheng
     

25 Jan, 2008

1 commit


18 Dec, 2007

2 commits

  • We can't use the device in a dev_err() after a kzalloc failure or after the
    kfree, so simplify it to the pdev that was originally passed in.

    Cc: Eric Sesterhenn
    Signed-off-by: Shannon Nelson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • A few fixups from Andrew's code comments.
    - removed "static inline" forward-declares
    - changed use of min() to min_t()
    - removed some unnecessary NULL initializations
    - removed a couple of BUG() calls

    Fixes this:

    drivers/dma/ioat_dma.c: In function `ioat1_tx_submit':
    drivers/dma/ioat_dma.c:177: sorry, unimplemented: inlining failed in call to '__ioat1_dma_memcpy_issue_pending': function body not available
    drivers/dma/ioat_dma.c:268: sorry, unimplemented: called from here

    Signed-off-by: Shannon Nelson
    Cc: "Williams, Dan J"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     

30 Nov, 2007

1 commit

  • This patch corrects recently changed (and now invalid) Kconfig descriptions
    for the DMA engine framework:

    - Non-Intel(R) hardware also has DMA engines;
    - DMA is used for more than memcpy and RAID offloading.

    In fact, on most platforms memcpy and RAID aren't factors, and DMA
    exists so that peripherals can transfer data to/from memory while
    the CPU does other work.

    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: David Brownell
    Signed-off-by: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     

15 Nov, 2007

2 commits

  • Add support for version 2 of the ioatdma device. This device handles
    the descriptor chain and DCA services slightly differently:
    - Instead of moving the dma descriptors between a busy and an idle chain,
    this new version uses a single circular chain so that we don't have
    rewrite the next_descriptor pointers as we add new requests, and the
    device doesn't need to re-read the last descriptor.
    - The new device has the DCA tags defined internally instead of needing
    them defined statically.

    Signed-off-by: Shannon Nelson
    Cc: "Williams, Dan J"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • When a DMA device is unregistered, its reference count is decremented twice
    for each channel: Once dma_class_dev_release() and once in
    dma_chan_cleanup(). This may result in the DMA device driver's remove()
    function completing before all channels have been cleaned up, causing lots
    of use-after-free fun.

    Fix it by incrementing the device's reference count twice for each
    channel during registration.

    [dan.j.williams@intel.com: kill unnecessary client refcounting]
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Dan Williams
    Signed-off-by: Shannon Nelson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     

30 Oct, 2007

1 commit

  • No reason I can think of of making them default y Most people don't have
    the hardware and with default y they just pollute lots of configs during
    make oldconfig.

    Signed-off-by: Andi Kleen
    Acked-by: Jeff Garzik
    Acked-by: "Nelson, Shannon"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

19 Oct, 2007

5 commits

  • The async_tx interface includes a completion callback. This adds support
    for using that callback, including using interrupts on completion.

    [akpm@linux-foundation.org: various fixes]
    Signed-off-by: Shannon Nelson
    Cc: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • The change to the async_tx interface cost this driver some performance by
    spreading the descriptor setup across several functions, including multiple
    passes over the new descriptor chain. Here we bring the work back into one
    primary function and only do one pass.

    [akpm@linux-foundation.org: cleanups, uninline]
    Signed-off-by: Shannon Nelson
    Cc: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • Make better use of dev_err(), and catch an error where the transaction
    creation might fail.

    Signed-off-by: Shannon Nelson
    Cc: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • Don't start ioat_dca if ioat_dma didn't start, and then stop ioat_dca
    before stopping ioat_dma. Since the ioat_dma side does the pci device
    work, This takes care of ioat_dca trying to use a bad device reference.

    Signed-off-by: Shannon Nelson
    Cc: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • Reorder the pci release actions
    Letting go of the resources in the right order helps get rid of
    occasional kernel complaints.

    Fix the pci_driver object name [Randy Dunlap]
    Rename the struct pci_driver data so that false section mismatch
    warnings won't be produced.

    Cc: Randy Dunlap
    Signed-off-by: Shannon Nelson
    Cc: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     

17 Oct, 2007

5 commits

  • Adrian Bunk points out that "unsafe" was used to mark modules touched by
    the deprecated MOD_INC_USE_COUNT interface, which has long gone. It's time
    to remove the member from the module structure, as well.

    If you want a module which can't unload, don't register an exit function.

    (Vlad Yasevich says SCTP is now safe to unload, so just remove the
    __unsafe there).

    Signed-off-by: Rusty Russell
    Acked-by: Shannon Nelson
    Acked-by: Dan Williams
    Acked-by: Vlad Yasevich
    Cc: Sridhar Samudrala
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Add code to connect to the DCA driver and provide cpu tags for use by
    drivers that would like to use Direct Cache Access hints.

    [Adrian Bunk] Several Kconfig cleanup items
    [Andrew Morten, Chris Leech] Fix for using cpu_physical_id() even when
    built for uni-processor

    Signed-off-by: Shannon Nelson
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • Add support for MSI and MSI-X interrupt handling, including the ability
    to choose the desired interrupt method.

    Signed-off-by: Shannon Nelson
    Acked-by: David S. Miller
    [bunk@kernel.org: drivers/dma/ioat_dma.c: make 3 functions static]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • Split the general PCI startup from the DMA handling code in order to
    prepare for adding support for DCA services and future versions of the
    ioatdma device.

    [Rusty Russell] Removal of __unsafe() usage.

    Signed-off-by: Shannon Nelson
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • Take care of a bunch of little code nits in ioatdma files

    Signed-off-by: Shannon Nelson
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson