diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2025-09-09 16:27:35 +0300 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2025-09-12 00:18:20 +0200 |
commit | e53d29f957b36ba1666331956c6ccb047bb157d2 (patch) | |
tree | 4d0b5095ec7b23e80251c0a312039ea05cd82dfd /rust/kernel/net.rs | |
parent | f9374de14c0e8c36cfb7c68618c07cb155e6f8e6 (diff) |
dma-mapping: convert dma_direct_*map_page to be phys_addr_t based
Convert the DMA direct mapping functions to accept physical addresses
directly instead of page+offset parameters. The functions were already
operating on physical addresses internally, so this change eliminates
the redundant page-to-physical conversion at the API boundary.
The functions dma_direct_map_page() and dma_direct_unmap_page() are
renamed to dma_direct_map_phys() and dma_direct_unmap_phys() respectively,
with their calling convention changed from (struct page *page,
unsigned long offset) to (phys_addr_t phys).
Architecture-specific functions arch_dma_map_page_direct() and
arch_dma_unmap_page_direct() are similarly renamed to
arch_dma_map_phys_direct() and arch_dma_unmap_phys_direct().
The is_pci_p2pdma_page() checks are replaced with DMA_ATTR_MMIO checks
to allow integration with dma_direct_map_resource and dma_direct_map_phys()
is extended to support MMIO path either.
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/bb15a22f76dc2e26683333ff54e789606cfbfcf0.1757423202.git.leonro@nvidia.com
Diffstat (limited to 'rust/kernel/net.rs')
0 files changed, 0 insertions, 0 deletions