All of lore.kernel.org
 help / color / mirror / Atom feed
* RPmsg, DMA and ARM64
@ 2015-03-24  4:37 Edgar E. Iglesias
  2015-03-25 15:36 ` Catalin Marinas
  2015-03-26 15:26 ` Russell King - ARM Linux
  0 siblings, 2 replies; 6+ messages in thread
From: Edgar E. Iglesias @ 2015-03-24  4:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

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().
drivers/rpmsg/virtio_rpmsg_bus.c:rpmsg_probe().
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?

Cheers,
Edgar

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-26 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24  4:37 RPmsg, DMA and ARM64 Edgar E. Iglesias
2015-03-25 15:36 ` Catalin Marinas
2015-03-26  1:30   ` Edgar E. Iglesias
2015-03-26 15:26 ` Russell King - ARM Linux
2015-03-26 16:01   ` Edgar E. Iglesias
2015-03-26 16:15     ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.