lkml.org 
[lkml]   [2020]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] remoteproc: virtio: support sharing vdev buffer
Hi Peng,

On Wed, Jul 22, 2020 at 09:15:43PM +0800, Peng Fan wrote:
> Support sharing vdev buffer between multiple vdevs by using name
> "vdevbuffer".
>
> Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/remoteproc/remoteproc_virtio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
> index dfd3808c34fd..5d78ebea111e 100644
> --- a/drivers/remoteproc/remoteproc_virtio.c
> +++ b/drivers/remoteproc/remoteproc_virtio.c
> @@ -343,6 +343,8 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id)
>
> /* Try to find dedicated vdev buffer carveout */
> mem = rproc_find_carveout_by_name(rproc, "vdev%dbuffer", rvdev->index);
> + if (!mem)
> + mem = rproc_find_carveout_by_name(rproc, "vdevbuffer");

We already have a way to share buffers [1], do you think it would work for you? I
would rather proceed that way to avoid introducing a 3rd way to deal with vdev
buffers.

Thanks,
Mathieu

[1]. https://elixir.bootlin.com/linux/v5.8-rc4/source/drivers/remoteproc/remoteproc_virtio.c#L389

> if (mem) {
> phys_addr_t pa;
>
> --
> 2.16.4
>

\
 
 \ /
  Last update: 2020-07-29 19:06    [W:0.066 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site