dma: add dma_*map*_attrs() interfaces
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest3 patches 2 repliesIn review
- v53 patches 2 repliesSuperseded
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | dma: document dma_*map*_attrs() interfacesDocumentation/ Documentation/ | +89 | 0 replies | |
| 2/3 | dma/ia64: update ia64 machvecs, swiotlb.carch/ arch/ arch/ +6 more | +249 | 0 replies | |
| 3/3 | IB: expand ib_umem_get() prototypedrivers/ drivers/ drivers/ +12 more | +75 | 2 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Arthur Kepner |
|---|---|
| 1/3 | |
| 2/3 | |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3 v6] dma: add dma_*map*_attrs() interfaces
v5-v6 changes:
- if CONFIG_HAVE_DMA_ATTRS isn't defined , use macros to define dma_*map*_attrs() - this gets around a build problem on alpha, and maybe other arches, too.
- fix ib_umem_get() call in drivers/infiniband/hw/nes/nes_verbs.c
---
Introduce new interfaces, dma_*map*_attrs(), for passing architecture-specific attributes when memory is mapped and unmapped for DMA. Give the interfaces default implementations which ignore attributes. Also introduce the dma_{set|get}_attr() interfaces for setting and retrieving individual attributes. Define one attribute, DMA_ATTR_WRITE_BARRIER, in anticipation of its use by ia64/sn. Select whether architectures implement arch-specific versions of the dma_*map*_attrs() interfaces via HAVE_DMA_ATTRS in Kconfig.
---
arch/Kconfig | 3 + arch/ia64/Kconfig | 1 include/linux/dma-attrs.h | 74 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/dma-mapping.h | 17 ++++++++++ 4 files changed, 95 insertions(+)
arch/Kconfig +3 -0
@@ -36,3 +36,6 @@ config HAVE_KPROBES config HAVE_KRETPROBES def_bool n + +config HAVE_DMA_ATTRS + def_bool n
arch/ia64/Kconfig +1 -0
@@ -19,6 +19,7 @@ config IA64 select HAVE_OPROFILE select HAVE_KPROBES select HAVE_KRETPROBES + select HAVE_DMA_ATTRS default y help The Itanium Processor Family is Intel's 64-bit successor to
include/linux/dma-attrs.h +74 -0
74 lines not on this page · raw message
include/linux/dma-mapping.h +17 -0
@@ -146,4 +146,21 @@ static inline void dmam_release_declared_memory(struct device *dev) }#endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ +#ifndef CONFIG_HAVE_DMA_ATTRS +struct dma_attrs ; + +#define dma_map_single_attrs (dev, cpu_addr, size, dir, attrs) \ + dma_map_single(dev, cpu_addr, size, dir) + +#define dma_unmap_single_attrs (dev, dma_addr, size, dir, attrs) \ + dma_unmap_single(dev, dma_addr, size, dir) + +#define dma_map_sg_attrs (dev, sgl, nents, dir, attrs) \ + dma_map_sg(dev, sgl, nents, dir) + +#define dma_unmap_sg_attrs (dev, sgl, nents, dir, attrs) \ + dma_unmap_sg(dev, sgl, nents, dir) + +#endif /* CONFIG_HAVE_DMA_ATTRS */ +#endif