1. 19 12月, 2013 1 次提交
    • W
      dma: pl330: ensure DMA descriptors are zero-initialised · 0baf8f6a
      Will Deacon 提交于
      I see the following splat with 3.13-rc1 when attempting to perform DMA:
      
      [  253.004516] Alignment trap: not handling instruction e1902f9f at [<c0204b40>]
      [  253.004583] Unhandled fault: alignment exception (0x221) at 0xdfdfdfd7
      [  253.004646] Internal error: : 221 [#1] PREEMPT SMP ARM
      [  253.004691] Modules linked in: dmatest(+) [last unloaded: dmatest]
      [  253.004798] CPU: 0 PID: 671 Comm: kthreadd Not tainted 3.13.0-rc1+ #2
      [  253.004864] task: df9b0900 ti: df03e000 task.ti: df03e000
      [  253.004937] PC is at dmaengine_unmap_put+0x14/0x34
      [  253.005010] LR is at pl330_tasklet+0x3c8/0x550
      [  253.005087] pc : [<c0204b44>]    lr : [<c0207478>]    psr: a00e0193
      [  253.005087] sp : df03fe48  ip : 00000000  fp : df03bf18
      [  253.005178] r10: bf00e108  r9 : 00000001  r8 : 00000000
      [  253.005245] r7 : df837040  r6 : dfb41800  r5 : df837048  r4 : df837000
      [  253.005316] r3 : dfdfdfcf  r2 : dfb41f80  r1 : df837048  r0 : dfdfdfd7
      [  253.005384] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [  253.005459] Control: 30c5387d  Table: 9fb9ba80  DAC: fffffffd
      [  253.005520] Process kthreadd (pid: 671, stack limit = 0xdf03e248)
      
      This is due to desc->txd.unmap containing garbage (uninitialised memory).
      
      Rather than add another dummy initialisation to _init_desc, instead
      ensure that the descriptors are zero-initialised during allocation and
      remove the dummy, per-field initialisation.
      
      Cc: Andriy Shevchenko <andriy.shevchenko@intel.com>
      Acked-by: NJassi Brar <jassisinghbrar@gmail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0baf8f6a
  2. 14 11月, 2013 1 次提交
  3. 13 11月, 2013 2 次提交
  4. 31 10月, 2013 2 次提交
  5. 14 10月, 2013 1 次提交
  6. 07 10月, 2013 1 次提交
  7. 03 9月, 2013 1 次提交
  8. 28 8月, 2013 1 次提交
    • L
      dma: pl330: Fix handling of TERMINATE_ALL while processing completed descriptors · 39ff8613
      Lars-Peter Clausen 提交于
      The pl330 DMA driver is broken in regard to handling a terminate all request
      while it is processing the list of completed descriptors. This is most visible
      when calling dmaengine_terminate_all() from within the descriptors callback for
      cyclic transfers. In this case the TERMINATE_ALL transfer will clear the
      work_list and stop the transfer. But after all callbacks for all completed
      descriptors have been handled the descriptors will be re-enqueued into the (now
      empty) work_list. So the next time dma_async_issue_pending() is called for the
      channel these descriptors will be transferred again which will cause data
      corruption. Similar issues can occur if dmaengine_terminate_all() is not called
      from within the descriptor callback but runs on a different CPU at the same time
      as the completed descriptor list is processed.
      
      This patch introduces a new per channel list which will hold the completed
      descriptors. While processing the list the channel's lock will be held to avoid
      racing against dmaengine_terminate_all(). The lock will be released when calling
      the descriptors callback though. Since the list of completed descriptors might
      be modified (e.g. by calling dmaengine_terminate_all() from the callback) we can
      not use the normal list iterator macros. Instead we'll need to check for each
      loop iteration again if there are still items in the list. The drivers
      TERMINATE_ALL implementation is updated to move descriptors from both the
      work_list as well the new completed_list back to the descriptor pool. This makes
      sure that none of the descripts finds its way back into the work list and also
      that we do not call any futher complete callbacks after
      dmaengine_terminate_all() has been called.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      39ff8613
  9. 13 8月, 2013 2 次提交
  10. 28 7月, 2013 1 次提交
  11. 16 7月, 2013 1 次提交
    • L
      dma: pl330: Implement device_slave_caps · ca38ff13
      Lars-Peter Clausen 提交于
      Implement the device_slave_caps() callback for the pl330 driver. This allows
      dmaengine users like the generic ALSA dmaengine PCM driver to query the
      capabilities of the driver. The PL330 supports all buswidths and both
      mem-to-dev as well as dev-to-mem transfers. In theory there is no limit on the
      number of segments that can be transferred (in practice you'll run out of memory
      eventually) and the number of bytes per segment is limited by the size of the
      PL330 program buffer. Due to the nature of the PL330 the maximum number of bytes
      per segment depends on the burstsize, the driver sets it to the value for a
      1-byte burstsize, since it is the smallest.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      ca38ff13
  12. 05 7月, 2013 2 次提交
  13. 04 7月, 2013 1 次提交
  14. 15 4月, 2013 2 次提交
  15. 03 4月, 2013 1 次提交
  16. 14 2月, 2013 3 次提交
  17. 08 1月, 2013 1 次提交
  18. 04 1月, 2013 1 次提交
    • G
      Drivers: dma: remove __dev* attributes. · 4bf27b8b
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitconst,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Cc: Dan Williams <djbw@fb.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Barry Song <baohua.song@csr.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Jassi Brar <jassisinghbrar@gmail.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bf27b8b
  19. 29 11月, 2012 1 次提交
  20. 22 9月, 2012 1 次提交
  21. 18 9月, 2012 5 次提交
  22. 14 9月, 2012 1 次提交
  23. 01 9月, 2012 1 次提交
  24. 14 6月, 2012 1 次提交
    • J
      DMA: PL330: Fix racy mutex unlock · fdec53d5
      Javi Merino 提交于
      pl330_update() stores a pointer to the thrd->req that finished, which
      contains a pointer to the corresponding pl330_req.  This is done with
      the pl330_lock held.  Then, it iterates through the req_done list,
      calling the callback for each of the requests that are done.  The
      problem is that the driver releases the lock before calling the
      callback for each of the callbacks.  pl330_submit_req() running in
      another processor can then acquire the lock and insert another request
      in one of the thrd->req that hasn't been processed yet, replacing the
      pointer to pl330_req there.  When the callback returns in
      pl330_update() and the next rqdone is popped from the list, it
      dereferences the pl330_req pointer to the just scheduled pl330_req,
      instead of the one that has finished, calling pl330 with the wrong r.
      
      This patch fixes this by storing the pointer to pl330_req directly in
      the list.
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Cc: Jassi Brar <jaswinder.singh@linaro.org>
      Acked-by: NJassi Brar <jaswinder.singh@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      fdec53d5
  25. 07 6月, 2012 2 次提交
  26. 11 5月, 2012 2 次提交
  27. 25 4月, 2012 1 次提交
    • O
      dma: pl330: fix a couple of compilation warnings · c8473828
      Olof Johansson 提交于
      Move a couple of tests and do a minor refactor to avoid:
      
      drivers/dma/pl330.c: In function 'pl330_probe':
      drivers/dma/pl330.c:2929:215: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      drivers/dma/pl330.c: In function 'pl330_tasklet':
      drivers/dma/pl330.c:2250:8: warning: 'pch' may be used uninitialized in this function [-Wuninitialized]
      drivers/dma/pl330.c:2228:25: note: 'pch' was declared here
      drivers/dma/pl330.c:2277:130: warning: 'pch' may be used uninitialized in this function [-Wuninitialized]
      drivers/dma/pl330.c:2260:25: note: 'pch' was declared here
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      c8473828