Skip to content

dma-mapping: migrate to physical address-based API

Leon Romanovsky linux-doc linux-iommu linux-mm linux-trace-kernel linuxppc-dev lkml virtualization 1 version Applied

Status from this message: Applied patches 1-7 to my dma-mapping-next branch. Let me know if one

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 28 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8dma-debug: refactor to use physical addresses for page mappingDocumentation/core-api/dma-api.rst kernel/dma/debug.c kernel/dma/debug.h +1 more+34 -290 replies
2/8dma-mapping: rename trace_dma_*map_page to trace_dma_*map_physinclude/trace/events/dma.h kernel/dma/mapping.c+4 -40 replies
3/8iommu/dma: rename iommu_dma_*map_page to iommu_dma_*map_physdrivers/iommu/dma-iommu.c include/linux/iommu-dma.h kernel/dma/mapping.c +1 more+14 -170 replies
4/8dma-mapping: convert dma_direct_*map_page to be phys_addr_t basedarch/powerpc/kernel/dma-iommu.c include/linux/dma-map-ops.h kernel/dma/direct.c +2 more+19 -200 replies
5/8kmsan: convert kmsan_handle_dma to use physical addressesdrivers/virtio/virtio_ring.c include/linux/kmsan.h kernel/dma/mapping.c +2 more+40 -163 replies
6/8dma-mapping: fail early if physical address is mapped through platform callbackkernel/dma/mapping.c+14 -12 replies
7/8dma-mapping: export new dma_*map_phys() interfaceinclude/linux/dma-mapping.h kernel/dma/mapping.c+33 -50 replies
8/8mm/hmm: migrate to physical address-based DMA mapping APImm/hmm.c+4 -42 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchAlexander Potapenko
1/8
2/8
3/8
4/8
5/8A-b
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] dma-mapping: migrate to physical address-based API

This series refactors the DMA mapping to use physical addresses as the primary interface instead of page+offset parameters. This change aligns the DMA API with the underlying hardware reality where DMA operations work with physical addresses, not page structures.

The series consists of 8 patches that progressively convert the DMA mapping infrastructure from page-based to physical address-based APIs:

The series maintains backward compatibility by keeping the old page-based API as wrapper functions around the new physical address-based implementations.

Thanks

Leon Romanovsky (8):
dma-debug: refactor to use physical addresses for page mapping
dma-mapping: rename trace_dma_*map_page to trace_dma_*map_phys iommu/dma: rename iommu_dma_*map_page to iommu_dma_*map_phys
dma-mapping: convert dma_direct_*map_page to be phys_addr_t based
kmsan: convert kmsan_handle_dma to use physical addresses
dma-mapping: fail early if physical address is mapped through platform
callback
dma-mapping: export new dma_*map_phys() interface
mm/hmm: migrate to physical address-based DMA mapping API

 Documentation/core-api/dma-api.rst |  4 +-
 arch/powerpc/kernel/dma-iommu.c    |  4 +-
 drivers/iommu/dma-iommu.c          | 14 +++----
 drivers/virtio/virtio_ring.c       |  4 +-
 include/linux/dma-map-ops.h        |  8 ++--
 include/linux/dma-mapping.h        | 13 ++++++
 include/linux/iommu-dma.h          |  7 ++--
 include/linux/kmsan.h              | 12 +++---
 include/trace/events/dma.h         |  4 +-
 kernel/dma/debug.c                 | 28 ++++++++-----
 kernel/dma/debug.h                 | 16 ++++---
 kernel/dma/direct.c                |  6 +--
 kernel/dma/direct.h                | 13 +++---
 kernel/dma/mapping.c               | 67 +++++++++++++++++++++---------
 kernel/dma/ops_helpers.c           |  6 +--
 mm/hmm.c                           |  8 ++--
 mm/kmsan/hooks.c                   | 36 ++++++++++++----
 tools/virtio/linux/kmsan.h         |  2 +-
 18 files changed, 159 insertions(+), 93 deletions(-)
Signature · 1 line
2.49.0