On Thu, Mar 30, 2023 at 4:26 PM Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > Make it clearer what is going on by adding a function to go back from the > "virtual" dma_addr to a struct page. This is used in the > ib_uses_virt_dma() style drivers (siw, rxe, hfi, qib). > > Call it instead of a naked virt_to_page() when working with dma_addr > values encoded by the various ib_map functions. > > This also fixes the vir_to_page() casting problem Linus Walleij has been > chasing. > > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> Excellent, thanks Jason! Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Yours, Linus Walleij