Merge tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Oct 2016 00:13:54 +0000 (17:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Oct 2016 00:13:54 +0000 (17:13 -0700)
Pull dmaengine updates from Vinod Koul:
 "This is bit large pile of code which bring in some nice additions:

   - Error reporting: we have added a new mechanism for users of
     dmaenegine to register a callback_result which tells them the
     result of the dma transaction. Right now only one user (ntb) is
     using it.

   - As we discussed on KS mailing list and pointed out NO_IRQ has no
     place in kernel, this also remove NO_IRQ from dmaengine subsystem
     (both arm and ppc users)

   - Support for IOMMU slave transfers and its implementation for arm.

   - To get better build coverage, enable COMPILE_TEST for bunch of
     driver, and fix the warning and sparse complaints on these.

   - Apart from above, usual updates spread across drivers"

* tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (169 commits)
  async_pq_val: fix DMA memory leak
  dmaengine: virt-dma: move function declarations
  dmaengine: omap-dma: Enable burst and data pack for SG
  DT: dmaengine: rcar-dmac: document R8A7743/5 support
  dmaengine: fsldma: Unmap region obtained by of_iomap
  dmaengine: jz4780: fix resource leaks on error exit return
  dma-debug: fix ia64 build, use PHYS_PFN
  dmaengine: coh901318: fix integer overflow when shifting more than 32 places
  dmaengine: edma: avoid uninitialized variable use
  dma-mapping: fix m32r build warning
  dma-mapping: fix ia64 build, use PHYS_PFN
  dmaengine: ti-dma-crossbar: enable COMPILE_TEST
  dmaengine: omap-dma: enable COMPILE_TEST
  dmaengine: edma: enable COMPILE_TEST
  dmaengine: ti-dma-crossbar: Fix of_device_id data parameter usage
  dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter
  dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs
  dmaengine: edma: Rename set_bits and remove unused clear_bits helper
  dmaengine: edma: Use correct type for of_find_property() third parameter
  dmaengine: edma: Fix of_device_id data parameter usage (legacy vs TPCC)
  ...

1  2 
arch/arm/mm/dma-mapping.c
drivers/dma/at_xdmac.c
drivers/dma/dw/core.c
drivers/dma/fsl_raid.c
drivers/dma/imx-sdma.c
include/linux/dma-mapping.h
lib/dma-debug.c

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -664,36 -689,12 +686,35 @@@ static void sdma_update_channel_loop(st
                if (bd->mode.status & BD_DONE)
                        break;
  
 -              if (bd->mode.status & BD_RROR)
 +              if (bd->mode.status & BD_RROR) {
 +                      bd->mode.status &= ~BD_RROR;
                        sdmac->status = DMA_ERROR;
 +                      error = -EIO;
 +              }
  
 +             /*
 +              * We use bd->mode.count to calculate the residue, since contains
 +              * the number of bytes present in the current buffer descriptor.
 +              */
 +
 +              sdmac->chn_real_count = bd->mode.count;
                bd->mode.status |= BD_DONE;
-               if (sdmac->desc.callback)
-                       sdmac->desc.callback(sdmac->desc.callback_param);
 +              bd->mode.count = sdmac->period_len;
 +
 +              /*
 +               * The callback is called from the interrupt context in order
 +               * to reduce latency and to avoid the risk of altering the
 +               * SDMA transaction status by the time the client tasklet is
 +               * executed.
 +               */
 +
++              dmaengine_desc_get_callback_invoke(&sdmac->desc, NULL);
 +
                sdmac->buf_tail++;
                sdmac->buf_tail %= sdmac->num_bd;
 +
 +              if (error)
 +                      sdmac->status = old_status;
        }
  }
  
@@@ -722,10 -722,20 +743,10 @@@ static void mxc_sdma_handle_channel_nor
                sdmac->status = DMA_COMPLETE;
  
        dma_cookie_complete(&sdmac->desc);
-       if (sdmac->desc.callback)
-               sdmac->desc.callback(sdmac->desc.callback_param);
+       dmaengine_desc_get_callback_invoke(&sdmac->desc, NULL);
  }
  
 -static void sdma_tasklet(unsigned long data)
 -{
 -      struct sdma_channel *sdmac = (struct sdma_channel *) data;
 -
 -      if (sdmac->flags & IMX_DMA_SG_LOOP)
 -              sdma_handle_channel_loop(sdmac);
 -      else
 -              mxc_sdma_handle_channel_normal(sdmac);
 -}
 -
  static irqreturn_t sdma_int_handler(int irq, void *dev_id)
  {
        struct sdma_engine *sdma = dev_id;
Simple merge
diff --cc lib/dma-debug.c
Simple merge