RPmsg, DMA and ARM64
Edgar E. Iglesias
edgar.iglesias at gmail.com
Mon Mar 23 21:37:49 PDT 2015
I'm trying to run rpmsg and remoteproc on the ZynqMP but hitting an mm error.
I'm not sure who is breaking the rules, rpmsg or the dma allocators?
When rpmsg sets up the virtqueues, it allocates memory with
dma_alloc_coherent() and initializes a scatterlist with sg_init_one().
sg_init_one() requires that the memory it gets is virt_addr_valid().
The problem I'm seeing is that on arm64, the dma alloc functions can
return vmalloced (via dma_common_contiguous_remap) memory. This
then causes havoc when the scatterlist code tries to go virt_to_page
and back to get hold of a physical adress (sg_phys()).
I couldn't find a definitive answer in the docs, is the arm64 DMA code
doing the right here when returning vmalloced memory?
More information about the linux-arm-kernel