Re: [PATCH for-next] RDMA/cxgb4: use dma_mmap_coherent() for mapping non-contiguous memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 07, 2024 at 01:31:03PM +0200, Christoph Hellwig wrote:
> On Sun, Jul 07, 2024 at 12:11:05PM +0300, Leon Romanovsky wrote:
> > On Fri, Jul 05, 2024 at 06:47:53PM +0530, Anumula Murali Mohan Reddy wrote:
> > > dma_alloc_coherent() allocates contiguous memory irrespective of
> > > iommu mode, but after commit f5ff79fddf0e ("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.
> > 
> > It is perfect time to move to use rdma_user_mmap_io(), instead of
> > open-code it in the driver.
> 
> rdma_user_mmap_io does not work on dma coherent allocations.

They used dma_mmap_coherent() to implement workaround, original cxgb4
didn't use it and probably doesn't need too.

Thanks




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux