public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: edgar.iglesias@gmail.com (Edgar E. Iglesias)
To: linux-arm-kernel@lists.infradead.org
Subject: RPmsg, DMA and ARM64
Date: Tue, 24 Mar 2015 14:37:49 +1000	[thread overview]
Message-ID: <20150324043749.GJ23658@toto> (raw)

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

             reply	other threads:[~2015-03-24  4:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24  4:37 Edgar E. Iglesias [this message]
2015-03-25 15:36 ` RPmsg, DMA and ARM64 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150324043749.GJ23658@toto \
    --to=edgar.iglesias@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox