Commit 75ab1533 authored by Anumula Murali Mohan Reddy's avatar Anumula Murali Mohan Reddy Committed by Leon Romanovsky
Browse files

RDMA/cxgb4: use dma_mmap_coherent() for mapping non-contiguous memory



dma_alloc_coherent() allocates contiguous memory irrespective of
iommu mode, but after commit f5ff79fd ("dma-mapping: remove CONFIG_DMA_REMAP")
if iommu is enabled in translate mode, dma_alloc_coherent() may
allocate non-contiguous memory. Attempt to map this memory results in panic.
This patch fixes the issue by using dma_mmap_coherent() to map each page
to user space.

Signed-off-by: default avatarAnumula Murali Mohan Reddy <anumula@chelsio.com>
Signed-off-by: default avatarPotnuri Bharat Teja <bharat@chelsio.com>
Link: https://lore.kernel.org/r/20240716142532.97423-1-anumula@chelsio.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 8400291e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment