Skip to content

devres: dma-mapping: Introducing new functions

Eli Billauer linux-iommu linux-pci lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 12 repliesIn review
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4dma-mapping: Add devm_ interface for dma_map_single()Documentation/driver-model/devres.txt drivers/base/dma-mapping.c include/linux/dma-mapping.h+93 -112 replies
2/4dma-mapping: Add devm_ interface for dma_map_single_attrs()Documentation/driver-model/devres.txt drivers/base/dma-mapping.c include/asm-generic/dma-mapping-common.h +1 more+45 -180 replies
3/4dma-mapping: pci: Add devm_ interface for pci_map_singleDocumentation/driver-model/devres.txt include/asm-generic/pci-dma-compat.h+20 -00 replies
4/4staging: xillybus: Use devm_ API for memory allocation and DMA mappingdrivers/staging/xillybus/xillybus.h drivers/staging/xillybus/xillybus_core.c drivers/staging/xillybus/xillybus_of.c +1 more+74 -2650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] devres: dma-mapping: Introducing new functions

This patchset consists of new functions to the managed device resource API, followed by a patch for the Xillybus driver, which is my motivation and what I tested with.

This is a resubmission after changing the API slightly.

Rationale: While migrating the staging/xillybus driver to rely completely on managed resources, some functionalities were missing, and hence added:

* dmam_map_single()
* dmam_unmap_single()
* pcim_map_single()
* pcim_unmap_single()

Tejun suggested that dma_map_single_attrs() should have a managed version as well. The second patch in this set turns dmam_map_single() into dma_map_single_attrs(), and implements the former as a macro. Functions added:

* dmam_map_single_attrs()
* dmam_unmap_single_attrs()

Xillybus' driver works with and without this patch (depends on patches #1 and #3 only).

Thanks,
Eli

Eli Billauer (4):
dma-mapping: Add devm_ interface for dma_map_single()
dma-mapping: Add devm_ interface for dma_map_single_attrs()
dma-mapping: pci: Add devm_ interface for pci_map_single
staging: xillybus: Use devm_ API for memory allocation and DMA
mapping

 Documentation/driver-model/devres.txt    |    6 +
 drivers/base/dma-mapping.c               |  106 +++++++++++++++++
 drivers/staging/xillybus/xillybus.h      |   38 +------
 drivers/staging/xillybus/xillybus_core.c |  186 +++++++++---------------------
 drivers/staging/xillybus/xillybus_of.c   |   61 +---------
 drivers/staging/xillybus/xillybus_pcie.c |   54 ++--------
 include/asm-generic/dma-mapping-common.h |    3 +
 include/asm-generic/pci-dma-compat.h     |   18 +++
 include/linux/dma-mapping.h              |    8 +-
 9 files changed, 214 insertions(+), 266 deletions(-)
Signature · 1 line
1.7.2.3