1. 17 2月, 2014 1 次提交
  2. 12 2月, 2014 4 次提交
  3. 29 1月, 2014 1 次提交
    • A
      dmaengine: mmp_pdma: fix mismerge · 15cec530
      Arnd Bergmann 提交于
      The merge between 2b7f65b1 "mmp_pdma: Style neatening" and
      8010dad5 "dma: add dma_get_any_slave_channel(), for use in of_xlate()"
      caused a build error by leaving obsolete code in place:
      
        mmp_pdma.c: In function 'mmp_pdma_dma_xlate':
        mmp_pdma.c:909:31: error: 'candidate' undeclared
        mmp_pdma.c:912:3: error: label 'retry' used but not defined
        mmp_pdma.c:901:24: warning: unused variable 'c' [-Wunused-variable]
      
      This removes the extraneous lines.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      15cec530
  4. 28 1月, 2014 1 次提交
  5. 26 1月, 2014 2 次提交
  6. 20 1月, 2014 14 次提交
  7. 15 1月, 2014 1 次提交
  8. 13 1月, 2014 1 次提交
  9. 09 1月, 2014 1 次提交
  10. 08 1月, 2014 1 次提交
  11. 03 1月, 2014 1 次提交
    • J
      drivers/dma/ioat/dma.c: check DMA mapping error in ioat_dma_self_test() · 3532e566
      Jiang Liu 提交于
      Check DMA mapping return values in function ioat_dma_self_test() to get
      rid of following warning message.
      
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 1203 at lib/dma-debug.c:937 check_unmap+0x4c0/0x9a0()
        ioatdma 0000:00:04.0: DMA-API: device driver failed to check map error[device address=0x000000085191b000] [size=2000 bytes] [mapped as single]
        Modules linked in: ioatdma(+) mac_hid wmi acpi_pad lp parport hidd_generic usbhid hid ixgbe isci dca libsas ahci ptp libahci scsi_transport_sas meegaraid_sas pps_core mdio
        CPU: 0 PID: 1203 Comm: systemd-udevd Not tainted 3.13.0-rc4+ #8
        Hardware name: Intel Corporation BRICKLAND/BRICKLAND, BIOS BRIVTIIN1.86B.0044.L09.1311181644 11/18/2013
        Call Trace:
          dump_stack+0x4d/0x66
          warn_slowpath_common+0x7d/0xa0
          warn_slowpath_fmt+0x4c/0x50
          check_unmap+0x4c0/0x9a0
          debug_dma_unmap_page+0x81/0x90
          ioat_dma_self_test+0x3d2/0x680 [ioatdma]
          ioat3_dma_self_test+0x12/0x30 [ioatdma]
          ioat_probe+0xf4/0x110 [ioatdma]
          ioat3_dma_probe+0x268/0x410 [ioatdma]
          ioat_pci_probe+0x122/0x1b0 [ioatdma]
          local_pci_probe+0x45/0xa0
          pci_device_probe+0xd9/0x130
          driver_probe_device+0x171/0x490
          __driver_attach+0x93/0xa0
          bus_for_each_dev+0x6b/0xb0
          driver_attach+0x1e/0x20
          bus_add_driver+0x1f8/0x2b0
          driver_register+0x81/0x110
          __pci_register_driver+0x60/0x70
          ioat_init_module+0x89/0x1000 [ioatdma]
          do_one_initcall+0xe2/0x250
          load_module+0x2313/0x2a00
          SyS_init_module+0xd9/0x130
          system_call_fastpath+0x1a/0x1f
        ---[ end trace 990c591681d27c31 ]---
        Mapped at:
          debug_dma_map_page+0xbe/0x180
          ioat_dma_self_test+0x1ab/0x680 [ioatdma]
          ioat3_dma_self_test+0x12/0x30 [ioatdma]
          ioat_probe+0xf4/0x110 [ioatdma]
          ioat3_dma_probe+0x268/0x410 [ioatdma]
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3532e566
  12. 19 12月, 2013 4 次提交
    • D
      net_dma: mark broken · 77873803
      Dan Williams 提交于
      net_dma can cause data to be copied to a stale mapping if a
      copy-on-write fault occurs during dma.  The application sees missing
      data.
      
      The following trace is triggered by modifying the kernel to WARN if it
      ever triggers copy-on-write on a page that is undergoing dma:
      
       WARNING: CPU: 24 PID: 2529 at lib/dma-debug.c:485 debug_dma_assert_idle+0xd2/0x120()
       ioatdma 0000:00:04.0: DMA-API: cpu touching an active dma mapped page [pfn=0x16bcd9]
       Modules linked in: iTCO_wdt iTCO_vendor_support ioatdma lpc_ich pcspkr dca
       CPU: 24 PID: 2529 Comm: linbug Tainted: G        W    3.13.0-rc1+ #353
        00000000000001e5 ffff88016f45f688 ffffffff81751041 ffff88017ab0ef70
        ffff88016f45f6d8 ffff88016f45f6c8 ffffffff8104ed9c ffffffff810f3646
        ffff8801768f4840 0000000000000282 ffff88016f6cca10 00007fa2bb699349
       Call Trace:
        [<ffffffff81751041>] dump_stack+0x46/0x58
        [<ffffffff8104ed9c>] warn_slowpath_common+0x8c/0xc0
        [<ffffffff810f3646>] ? ftrace_pid_func+0x26/0x30
        [<ffffffff8104ee86>] warn_slowpath_fmt+0x46/0x50
        [<ffffffff8139c062>] debug_dma_assert_idle+0xd2/0x120
        [<ffffffff81154a40>] do_wp_page+0xd0/0x790
        [<ffffffff811582ac>] handle_mm_fault+0x51c/0xde0
        [<ffffffff813830b9>] ? copy_user_enhanced_fast_string+0x9/0x20
        [<ffffffff8175fc2c>] __do_page_fault+0x19c/0x530
        [<ffffffff8175c196>] ? _raw_spin_lock_bh+0x16/0x40
        [<ffffffff810f3539>] ? trace_clock_local+0x9/0x10
        [<ffffffff810fa1f4>] ? rb_reserve_next_event+0x64/0x310
        [<ffffffffa0014c00>] ? ioat2_dma_prep_memcpy_lock+0x60/0x130 [ioatdma]
        [<ffffffff8175ffce>] do_page_fault+0xe/0x10
        [<ffffffff8175c862>] page_fault+0x22/0x30
        [<ffffffff81643991>] ? __kfree_skb+0x51/0xd0
        [<ffffffff813830b9>] ? copy_user_enhanced_fast_string+0x9/0x20
        [<ffffffff81388ea2>] ? memcpy_toiovec+0x52/0xa0
        [<ffffffff8164770f>] skb_copy_datagram_iovec+0x5f/0x2a0
        [<ffffffff8169d0f4>] tcp_rcv_established+0x674/0x7f0
        [<ffffffff816a68c5>] tcp_v4_do_rcv+0x2e5/0x4a0
        [..]
       ---[ end trace e30e3b01191b7617 ]---
       Mapped at:
        [<ffffffff8139c169>] debug_dma_map_page+0xb9/0x160
        [<ffffffff8142bf47>] dma_async_memcpy_pg_to_pg+0x127/0x210
        [<ffffffff8142cce9>] dma_memcpy_pg_to_iovec+0x119/0x1f0
        [<ffffffff81669d3c>] dma_skb_copy_datagram_iovec+0x11c/0x2b0
        [<ffffffff8169d1ca>] tcp_rcv_established+0x74a/0x7f0:
      
      ...the problem is that the receive path falls back to cpu-copy in
      several locations and this trace is just one of the areas.  A few
      options were considered to fix this:
      
      1/ sync all dma whenever a cpu copy branch is taken
      
      2/ modify the page fault handler to hold off while dma is in-flight
      
      Option 1 adds yet more cpu overhead to an "offload" that struggles to compete
      with cpu-copy.  Option 2 adds checks for behavior that is already documented as
      broken when using get_user_pages().  At a minimum a debug mode is warranted to
      catch and flag these violations of the dma-api vs get_user_pages().
      
      Thanks to David for his reproducer.
      
      Cc: <stable@vger.kernel.org>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Reported-by: NDavid Whipple <whipple@securedatainnovations.ch>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      77873803
    • 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
    • L
      dma: pl08x: allow zero slave channels · 1080411c
      Linus Walleij 提交于
      It might happen that a platform wants to use its DMA engine for
      memcpy only, and then we have zero slave channels to initialize,
      so allow the slave initialization to return zero.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      1080411c
    • E
      dma: edma: Set debug level to debugging messages · 0e772c67
      Ezequiel Garcia 提交于
      The channel allocated/released messages are very spammy and not really
      interesting to users. Change them to "debug" level.
      Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Acked-by: NMatt Porter <mporter@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      0e772c67
  13. 16 12月, 2013 6 次提交
    • V
      dmaengine: mmp: fix uninitialized variable · a9ebbcd9
      Vinod Koul 提交于
      drivers/dma/mmp_tdma.c:236:8: warning: 'tdcr' may be used
      uninitialized in this function [-Wuninitialized]
      Reported-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      a9ebbcd9
    • V
      dmaengine: mmp_tdma: fix the 'pointer from integer' warnings · 9d0f1fa6
      Vinod Koul 提交于
      the driver is using unsigned long type for storing the channel register base
      "reg_base", this leads to bunch of warns when we try to use this as pointer. So
      better use an iomem pointer type for this variable
      
      drivers/dma/mmp_tdma.c: In function 'mmp_tdma_chan_set_desc':
      drivers/dma/mmp_tdma.c:143: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:144: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:144: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c: In function 'mmp_tdma_enable_chan':
      drivers/dma/mmp_tdma.c:151: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:153: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:153: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c: In function 'mmp_tdma_disable_chan':
      drivers/dma/mmp_tdma.c:160: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:160: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:164: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c: In function 'mmp_tdma_resume_chan':
      drivers/dma/mmp_tdma.c:171: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:171: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c: In function 'mmp_tdma_pause_chan':
      drivers/dma/mmp_tdma.c:178: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:178: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c: In function 'mmp_tdma_config_chan':
      drivers/dma/mmp_tdma.c:263: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c: In function 'mmp_tdma_clear_chan_irq':
      drivers/dma/mmp_tdma.c:269: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
      drivers/dma/mmp_tdma.c:274: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      9d0f1fa6
    • J
      mmp_pdma: Style neatening · 2b7f65b1
      Joe Perches 提交于
      Neaten code used as a template for other drivers.
      Make the code more consistent with kernel styles.
      
      o Convert #defines with (1<<foo) to BIT(foo)
      o Alignment wrapping
      o Logic inversions to put return at end of functions
      o Convert devm_kzalloc with multiply to devm_kcalloc
      o typo of Peripheral fix
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      2b7f65b1
    • N
      dma: imx-sdma: Add new dma type for ssi dual fifo script · 1a895578
      Nicolin Chen 提交于
      This patch adds a new DMA_TYPE for SSI dual FIFO script, included
      in SDMA firmware version 2. This script would allow SSI use dual
      fifo mode to transimit/receive data without occasional hardware
      underrun/overrun.
      Signed-off-by: NNicolin Chen <b42378@freescale.com>
      Acked-by: NKumar Gala <galak@codeaurora.org>
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      1a895578
    • N
      dma: imx-sdma: Add sdma firmware version 2 support · cd72b846
      Nicolin Chen 提交于
      On i.MX5/6 series, SDMA is using new version firmware to support SSI
      dual FIFO feature and HDMI Audio (i.MX6Q/DL only). Thus add it.
      Signed-off-by: NNicolin Chen <b42378@freescale.com>
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      cd72b846
    • L
      dma: pl330: Alloc dma_parms for the dma device · b714b84e
      Lars-Peter Clausen 提交于
      In order to be able to set a maximum segment size for the device we need to
      allocate a dma_parameters struct for the device first.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      b714b84e
  14. 13 12月, 2013 2 次提交
    • D
      dmaengine: fix sleep in atomic · 8194ee27
      Dan Williams 提交于
       BUG: sleeping function called from invalid context at mm/mempool.c:203
       in_atomic(): 1, irqs_disabled(): 0, pid: 43502, name: linbug
       no locks held by linbug/43502.
       CPU: 7 PID: 43502 Comm: linbug Not tainted 3.13.0-rc1+ #15
       Hardware name:
        0000000000000010 ffff88005ebd1878 ffffffff8172d512 ffff8801752bc1c0
        ffff8801752bc1c0 ffff88005ebd1898 ffffffff8109d1f6 ffff88005f9a3c58
        ffff880177f0f080 ffff88005ebd1918 ffffffff81161f43 ffff88005ebd18f8
       Call Trace:
        [<ffffffff8172d512>] dump_stack+0x4e/0x68
        [<ffffffff8109d1f6>] __might_sleep+0xe6/0x120
        [<ffffffff81161f43>] mempool_alloc+0x93/0x170
        [<ffffffff810c0c34>] ? mark_held_locks+0x74/0x140
        [<ffffffff8118a826>] ? follow_page_mask+0x556/0x600
        [<ffffffff814107ae>] dmaengine_get_unmap_data+0x2e/0x60
        [<ffffffff81410f11>] dma_async_memcpy_pg_to_pg+0x41/0x1c0
        [<ffffffff814110e0>] dma_async_memcpy_buf_to_pg+0x50/0x60
        [<ffffffff81411bdc>] dma_memcpy_to_iovec+0xfc/0x190
        [<ffffffff816163af>] dma_skb_copy_datagram_iovec+0x6f/0x2b0
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      8194ee27
    • R
      dmaengine: mv_xor: fix oops when channels fail to initialise · 0be8253f
      Russell King 提交于
      When a channel fails to initialise, we error out and clean up any
      previously unregistered channels by walking the entire xordev->channels
      array.  Unfortunately, there are paths which end up storing an error
      pointer in this array, which we then try and dereference in the cleanup
      code, which causes an oops.
      
      Fix this by avoiding writing invalid pointers to this array in the first
      place.
      Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0be8253f