]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dma-mapping: implement DMA_ATTR_MMIO for dma_(un)map_page_attrs()
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 9 Sep 2025 13:27:37 +0000 (16:27 +0300)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 11 Sep 2025 22:18:20 +0000 (00:18 +0200)
commit18c9cbb042c930eb37f68df216319a371f4fcb22
treea4b5b32e9ed3f51bcb58eafe462c4788d8ad984f
parent6eb1e769b2c13a33cb2ca694454a7561d3d72c0a
dma-mapping: implement DMA_ATTR_MMIO for dma_(un)map_page_attrs()

Make dma_map_page_attrs() and dma_map_page_attrs() respect
DMA_ATTR_MMIO.

DMA_ATR_MMIO makes the functions behave the same as
dma_(un)map_resource():
 - No swiotlb is possible
 - Legacy dma_ops arches use ops->map_resource()
 - No kmsan
 - No arch_dma_map_phys_direct()

The prior patches have made the internal functions called here
support DMA_ATTR_MMIO.

This is also preparation for turning dma_map_resource() into an inline
calling dma_map_phys(DMA_ATTR_MMIO) to consolidate the flows.

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/3660e2c78ea409d6c483a215858fb3af52cd0ed3.1757423202.git.leonro@nvidia.com
kernel/dma/mapping.c