On Thu, Jun 11, 2020 at 03:06:12PM +0000, Bernard Metzler wrote: > >> It initially comes from the scatterlist provided by the > >> kernel user via drivers .map_mr_sg() method. There we get a > >> dma_addr_t describing the users buffer. > > > >For the SW dma maps you have to convert the dma_addr_t to a kva using > >kmap, it cannot just be casted. > > > True for a real dma addr. But here the user initially came > with an address it got from dma_virt_ops.dma_virt_map_page(), > which provides the virtual address of the page referenced, > casted to dma_addr_t. Oh, that's curiously broken on highmem systems, but OK siw is fine with it like that, though I think it would have been better to have some helper function connected to dma_virt do this cast. Jason