]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/dma: rename iommu_dma_*map_page to iommu_dma_*map_phys
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 9 Sep 2025 13:27:33 +0000 (16:27 +0300)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 11 Sep 2025 22:18:20 +0000 (00:18 +0200)
commit513559f73700966ded094b090c3ecc6dff877ef9
tree045f3cb6e9d92db44216774f305284f3a77003aa
parent76bb7c49f50ce7687f98eb35e78798584652dd0e
iommu/dma: rename iommu_dma_*map_page to iommu_dma_*map_phys

Rename the IOMMU DMA mapping functions to better reflect their actual
calling convention. The functions iommu_dma_map_page() and
iommu_dma_unmap_page() are renamed to iommu_dma_map_phys() and
iommu_dma_unmap_phys() respectively, as they already operate on physical
addresses rather than page structures.

The calling convention changes from accepting (struct page *page,
unsigned long offset) to (phys_addr_t phys), which eliminates the need
for page-to-physical address conversion within the functions. This
renaming prepares for the broader DMA API conversion from page-based
to physical address-based mapping throughout the kernel.

All callers are updated to pass physical addresses directly, including
dma_map_page_attrs(), scatterlist mapping functions, and DMA page
allocation helpers. The change simplifies the code by removing the
page_to_phys() + offset calculation that was previously done inside
the IOMMU functions.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/ed172f95f8f57782beae04f782813366894e98df.1757423202.git.leonro@nvidia.com
drivers/iommu/dma-iommu.c
include/linux/iommu-dma.h
kernel/dma/mapping.c
kernel/dma/ops_helpers.c