On Mon, Jan 14, 2019 at 04:17:57PM +0200, Gal Pressman wrote: > On 04-Jan-19 05:51, Jason Gunthorpe wrote: > > Also you can't mmap to user space dma_coherent memory, so this entire > > thing needs reworking to use non-coherent memory and proper barriers > > like all the other drivers. > > Hi Jason, > Why can't coherent DMA memory be mmapped to userspace? (BTW, looks like cxgb4 > does that). Coherent memory _can_ be mapped to userspace (at least in general, we have a few architectures that opt out of that). > Also, if the streaming DMA mapping is used, how can the userspace call dma_sync_*? > As far as I can tell, the userspace udma_*_device_barrier doesn't seem to > replace it. Userspace can't. It will needs its own implementation of those functions.