All of lore.kernel.org
 help / color / mirror / Atom feed
* virtio remoteproc device
@ 2018-04-20 16:53 ` Michael S. Tsirkin
  0 siblings, 0 replies; 14+ messages in thread
From: Michael S. Tsirkin @ 2018-04-20 16:53 UTC (permalink / raw)
  To: linux-remoteproc; +Cc: Ohad Ben-Cohen, Bjorn Andersson, virtualization

Hello!
I note the following in the serial console:

      if (is_rproc_serial(vdev)) {
                /*
                 * Allocate DMA memory from ancestor. When a virtio
                 * device is created by remoteproc, the DMA memory is
                 * associated with the grandparent device:
                 * vdev => rproc => platform-dev.
                 */
                if (!vdev->dev.parent || !vdev->dev.parent->parent)
                        goto free_buf;
                buf->dev = vdev->dev.parent->parent;

                /* Increase device refcnt to avoid freeing it */
                get_device(buf->dev);
                buf->buf = dma_alloc_coherent(buf->dev, buf_size, &buf->dma,
                                              GFP_KERNEL);
        }

Added here:
	commit 1b6370463e88b0c1c317de16d7b962acc1dab4f2
	Author: Sjur Br�ndeland <sjur.brandeland@stericsson.com>
	Date:   Fri Dec 14 14:40:51 2012 +1030

    virtio_console: Add support for remoteproc serial


I am not familiar with rproc so I have a question:
why is it required to use coherent memory here,
and why through a grandparent device?

Would it work to instead change vring_use_dma_api
to whitelist rproc (like we do for xen)?

I can sent a patch for your testing.
Thanks!

-- 
MST

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

end of thread, other threads:[~2018-04-23 21:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 16:53 virtio remoteproc device Michael S. Tsirkin
2018-04-20 16:53 ` Michael S. Tsirkin
2018-04-22  4:08 ` Anup Patel
2018-04-22  4:08   ` Anup Patel
2018-04-23  8:55   ` Loic PALLARDY
2018-04-23  8:55     ` Loic PALLARDY
2018-04-23 11:52     ` Michael S. Tsirkin
2018-04-23 11:52       ` Michael S. Tsirkin
2018-04-23 19:40     ` Michael S. Tsirkin
2018-04-23 19:40       ` Michael S. Tsirkin
2018-04-23 20:45       ` Loic PALLARDY
2018-04-23 20:45         ` Loic PALLARDY
2018-04-23 21:02         ` Michael S. Tsirkin
2018-04-23 21:02           ` Michael S. Tsirkin

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.