Re: [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API

From: Julien Grall
Date: Thu Sep 26 2019 - 05:50:05 EST


Hi Rob,


On 9/25/19 10:50 PM, Rob Herring wrote:
As the comment says, this isn't a DT based device. of_dma_configure()
is going to stop allowing a NULL DT node, so this needs to be fixed.

And this can't work on arch not selecting CONFIG_OF and can select CONFIG_XEN_GRANT_DMA_ALLOC.

We are lucky enough on x86 because, AFAICT, arch_setup_dma_ops is just a nop.


Not sure exactly what setup besides arch_setup_dma_ops is needed...

We probably want to update dma_mask, coherent_dma_mask and dma_pfn_offset.

Also, while look at of_configure_dma, I noticed that we consider the DMA will not be coherent for the grant-table. Oleksandr, do you know why they can't be coherent?

Cheers,

--
Julien Grall