linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/13] dmaengine: introduce dmaengine_unmap_data
@ 2013-10-18 17:35 Bartlomiej Zolnierkiewicz
  2013-10-18 17:35 ` [PATCH v2 01/13] dmatest: make driver unmap also source buffers by itself Bartlomiej Zolnierkiewicz
                   ` (12 more replies)
  0 siblings, 13 replies; 35+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2013-10-18 17:35 UTC (permalink / raw)
  To: dan.j.williams
  Cc: vinod.koul, dave.jiang, t.figa, kyungmin.park, linux,
	linux-kernel, b.zolnierkie

[ Original patch series description by Dan. ]

dmaengine from the beginning has placed the burden of unmapping dma
buffers on the individual drivers.  The thought being that since the dma
driver already has the descriptor it can use that information for
unmapping.  This results in a lot of cruft to read back data from
descriptors, places a burden on channels that need to break up an
operation internally into multiple descriptors, and makes it difficult
to have dma mappings with different lifetimes than the current
operation.

For example an xor->copy->xor chain wants to leave all buffers
mapped until completion, async_tx currently performs invalid overlapping
mappings.  With dmaengine_unmap_data map once and take a reference for
descriptor that uses the mapping.

Reference to v1:
	https://lkml.org/lkml/2012/12/6/71

Changes since v1:
- synced patch series with next-20131016
- removed no longer needed "async_memset: convert to dmaengine_unmap_data"
  patch (patch #5 in v1)
- added patch #1 ("dmatest: make driver unmap also source buffers by itself")
- added patch #11 ("NTB: convert to dmaengine_unmap_data")
- prepared pl330 driver for adding missing unmap in patch #3
- in patch #4:
  - fixed IS_ENABLED() check
  - fixed release ordering in dmaengine_destroy_unmap_pool()
  - fixed check for success in dmaengine_init_unmap_pool()
  - replaced kmem_cache_free() by mempool_free()
  - added missing unmap->len initializations
  - added __init tag to dmaengine_init_unmap_pool()
- in patch #5:
  - added missing unmap->len initialization
  - fixed whitespace damage
- did minor cleanups in patches #6 & #7
- added temporary dma_dest array in patches #8 & #9

Tested on Exynos4412-based Trats2 board containing PL330 DMA engine, with
additional patches doing memory copying tests using DMA memcpy API.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Bartlomiej Zolnierkiewicz (4):
  dmatest: make driver unmap also source buffers by itself
  NTB: convert to dmaengine_unmap_data
  dmaengine: remove DMA unmap from drivers
  dmaengine: remove DMA unmap flags

Dan Williams (9):
  dmaengine: consolidate memcpy apis
  dmaengine: prepare for generic 'unmap' data
  dmaengine: reference counted unmap data
  async_memcpy: convert to dmaengine_unmap_data
  async_xor: convert to dmaengine_unmap_data
  async_xor_val: convert to dmaengine_unmap_data
  async_raid6_recov: convert to dmaengine_unmap_data
  async_pq: convert to dmaengine_unmap_data
  async_pq_val: convert to dmaengine_unmap_data

 arch/arm/include/asm/hardware/iop3xx-adma.h |  30 ----
 arch/arm/include/asm/hardware/iop_adma.h    |   4 -
 arch/arm/mach-iop13xx/include/mach/adma.h   |  26 ---
 crypto/async_tx/async_memcpy.c              |  37 ++--
 crypto/async_tx/async_pq.c                  | 174 ++++++++++--------
 crypto/async_tx/async_raid6_recov.c         |  61 +++++--
 crypto/async_tx/async_xor.c                 | 123 +++++++------
 drivers/ata/pata_arasan_cf.c                |   3 +-
 drivers/dma/amba-pl08x.c                    |  32 +---
 drivers/dma/at_hdmac.c                      |  26 +--
 drivers/dma/dmaengine.c                     | 262 ++++++++++++++++++---------
 drivers/dma/dmatest.c                       |   9 +-
 drivers/dma/dw/core.c                       |  21 +--
 drivers/dma/ep93xx_dma.c                    |  30 +---
 drivers/dma/fsldma.c                        |  17 +-
 drivers/dma/ioat/dma.c                      |  20 +--
 drivers/dma/ioat/dma.h                      |  12 --
 drivers/dma/ioat/dma_v2.c                   |   2 +-
 drivers/dma/ioat/dma_v3.c                   | 179 +-----------------
 drivers/dma/iop-adma.c                      |  97 +---------
 drivers/dma/mv_xor.c                        |  45 +----
 drivers/dma/pl330.c                         |   2 +
 drivers/dma/ppc4xx/adma.c                   | 270 +---------------------------
 drivers/dma/timb_dma.c                      |  37 +---
 drivers/dma/txx9dmac.c                      |  25 +--
 drivers/media/platform/m2m-deinterlace.c    |   3 +-
 drivers/media/platform/timblogiw.c          |   2 +-
 drivers/misc/carma/carma-fpga.c             |   3 +-
 drivers/mtd/nand/atmel_nand.c               |   3 +-
 drivers/mtd/nand/fsmc_nand.c                |   2 -
 drivers/net/ethernet/micrel/ks8842.c        |   6 +-
 drivers/ntb/ntb_transport.c                 |  64 +++++--
 drivers/spi/spi-dw-mid.c                    |   4 +-
 include/linux/dmaengine.h                   |  64 +++++--
 34 files changed, 538 insertions(+), 1157 deletions(-)

-- 
1.8.2.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2013-10-28 22:54 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-18 17:35 [PATCH v2 00/13] dmaengine: introduce dmaengine_unmap_data Bartlomiej Zolnierkiewicz
2013-10-18 17:35 ` [PATCH v2 01/13] dmatest: make driver unmap also source buffers by itself Bartlomiej Zolnierkiewicz
2013-10-18 18:06   ` Andy Shevchenko
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 02/13] dmaengine: consolidate memcpy apis Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 03/13] dmaengine: prepare for generic 'unmap' data Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 04/13] dmaengine: reference counted unmap data Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 05/13] async_memcpy: convert to dmaengine_unmap_data Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 06/13] async_xor: " Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 07/13] async_xor_val: " Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 08/13] async_raid6_recov: " Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 09/13] async_pq: " Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 10/13] async_pq_val: " Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 11/13] NTB: " Bartlomiej Zolnierkiewicz
2013-10-19  1:06   ` Jon Mason
2013-10-22 21:08   ` Dan Williams
2013-10-22 21:29     ` Dan Williams
2013-10-22 23:12       ` Jon Mason
2013-10-23  1:05         ` Dan Williams
2013-10-23  1:18           ` Jon Mason
2013-10-18 17:35 ` [PATCH v2 12/13] dmaengine: remove DMA unmap from drivers Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-18 17:35 ` [PATCH v2 13/13] dmaengine: remove DMA unmap flags Bartlomiej Zolnierkiewicz
2013-10-22 21:08   ` Dan Williams
2013-10-22 23:07     ` Jon Mason
2013-10-28 22:54     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).