Thread (37 messages) 37 messages, 9 authors, 2019-07-08

Re: use exact allocation for dma coherent memory

From: Christoph Hellwig <hch@lst.de>
Date: 2019-06-20 10:51:58
Also in: dri-devel, intel-gfx, linux-arm-kernel, linux-iommu, linux-media, linux-mm, linux-rdma, linux-s390, linux-wireless, lkml

On Wed, Jun 19, 2019 at 01:29:03PM -0300, Jason Gunthorpe wrote:
quoted
Yes.  This will blow up badly on many platforms, as sq->queue
might be vmapped, ioremapped, come from a pool without page backing.
Gah, this addr gets fed into io_remap_pfn_range/remap_pfn_range too..

Potnuri, you should fix this.. 

You probably need to use dma_mmap_from_dev_coherent() in the mmap ?
The function to use is dma_mmap_coherent, dma_mmap_from_dev_coherent is
just an internal helper.

That beiŋ said the drivers/infiniband code has a lot of
*remap_pfn_range, and a lot of them look like they might be for
DMA memory.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help