From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Arnaud POULIQUEN <arnaud.pouliquen@foss.st.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
Rob Herring <robh@kernel.org>, Christoph Hellwig <hch@lst.de>,
Stefano Stabellini <stefanos@xilinx.com>,
Bruce Ashfield <bruce.ashfield@xilinx.com>
Subject: Re: [PATCH v8 0/4] remoteproc: restructure the remoteproc VirtIO device
Date: Tue, 20 Sep 2022 14:22:01 -0600 [thread overview]
Message-ID: <20220920202201.GB1042164@p14s> (raw)
In-Reply-To: <66e27df5-7697-446d-df7c-eb50e6d06f46@foss.st.com>
On Tue, Sep 20, 2022 at 03:44:18PM +0200, Arnaud POULIQUEN wrote:
> Hi Mathieu,
>
> On 9/20/22 00:30, Mathieu Poirier wrote:
> > Hi,
> >
> > On Fri, Aug 26, 2022 at 01:52:28PM +0200, Arnaud Pouliquen wrote:
> >> 1) Update from V7 [1]:
> >>
> >> - rebase on rproc-next branch [2], commit 729c16326b7f ("remoteproc: imx_dsp_rproc: fix argument 2 of rproc_mem_entry_init")
> >> The updates take into account the integration of the
> >> commit 1404acbb7f68 ("remoteproc: Fix dma_mem leak after rproc_shutdown")
> >> - add Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> according to reviews on V7
> >>
> >>
> >> [1] https://lkml.org/lkml/2022/7/13/663
> >> [2] https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=for-next
> >>
> >> 2) Patchset description:
> >>
> >> This series is a part of the work initiated a long time ago in
> >> the series "remoteproc: Decorelate virtio from core"[3]
> >>
> >> Objective of the work:
> >> - Update the remoteproc VirtIO device creation (use platform device)
> >> - Allow to declare remoteproc VirtIO device in DT
> >> - declare resources associated to a remote proc VirtIO
> >> - declare a list of VirtIO supported by the platform.
> >> - Prepare the enhancement to more VirtIO devices (e.g I2C, audio, video, ...).
> >> For instance be able to declare a I2C device in a virtio-i2C node.
> >> - Keep the legacy working!
> >> - Try to improve the picture about concerns reported by Christoph Hellwing [4][5]
> >>
> >> [3] https://lkml.org/lkml/2020/4/16/1817
> >> [4] https://lkml.org/lkml/2021/6/23/607
> >> [5] https://patchwork.kernel.org/project/linux-remoteproc/patch/AOKowLclCbOCKxyiJ71WeNyuAAj2q8EUtxrXbyky5E@cp7-web-042.plabs.ch/
> >>
> >> In term of device tree this would result in such hierarchy (stm32mp1 example with 2 virtio RPMSG):
> >>
> >> m4_rproc: m4@10000000 {
> >> compatible = "st,stm32mp1-m4";
> >> reg = <0x10000000 0x40000>,
> >> <0x30000000 0x40000>,
> >> <0x38000000 0x10000>;
> >> memory-region = <&retram>, <&mcuram>,<&mcuram2>;
> >> mboxes = <&ipcc 2>, <&ipcc 3>;
> >> mbox-names = "shutdown", "detach";
> >> status = "okay";
> >>
> >> #address-cells = <1>;
> >> #size-cells = <0>;
> >>
> >> vdev@0 {
> >> compatible = "rproc-virtio";
> >> reg = <0>;
> >> virtio,id = <7>; /* RPMSG */
> >> memory-region = <&vdev0vring0>, <&vdev0vring1>, <&vdev0buffer>;
> >> mboxes = <&ipcc 0>, <&ipcc 1>;
> >> mbox-names = "vq0", "vq1";
> >> status = "okay";
> >> };
> >>
> >> vdev@1 {
> >> compatible = "rproc-virtio";
> >> reg = <1>;
> >> virtio,id = <7>; /*RPMSG */
> >> memory-region = <&vdev1vring0>, <&vdev1vring1>, <&vdev1buffer>;
> >> mboxes = <&ipcc 4>, <&ipcc 5>;
> >> mbox-names = "vq0", "vq1";
> >> status = "okay";
> >> };
> >> };
> >
> > I was in the process of applying this set when the last patch gave me a
> > checkpatch warning about "virtio,rproc" not being documented.
> >
> > I suggest to introduce a new "virtio-rproc.yaml" based on this work[1], with the
> > above in the example sections.
>
> Yes I saw the warning, but for this first series it is not possible to declare
> the associated "rproc-virtio" device in device tree.
I understand and agree with your position.
I am going ahead and merging this set in order for it to get some exposure in
linux-next. That said be on the ready to address potential problems it may
cause.
> So at this step it seems not make senses to create the devicetree bindings file.
> More than that I don't know how I could justify the properties in bindings if
> there is not driver code associated.
>
> So i would be in favor of not adding the bindings in this series but to define
> bindings in the first patch of my "step 2" series; as done on my github:
> https://github.com/arnopo/linux/commit/9616d89a4f478cf78865a244efcde108d900f69f
>
> Please let me know your preference.
>
> Regards,
> Arnaud
>
>
> >
> > Thanks,
> > Mathieu
> >
> > [1]. https://elixir.bootlin.com/linux/v6.0-rc6/source/Documentation/devicetree/bindings/virtio/virtio-device.yaml
> >
> >
> >>
> >> I have divided the work in 4 steps to simplify the review, This series implements only
> >> the step 1:
> >> step 1: Redefine the remoteproc VirtIO device as a platform device
> >> - migrate rvdev management in remoteproc virtio.c,
> >> - create a remotproc virtio config ( can be disabled for platform that not use VirtIO IPC.
> >> step 2: Add possibility to declare and probe a VirtIO sub node
> >> - VirtIO bindings declaration,
> >> - multi DT VirtIO devices support,
> >> - introduction of a remote proc virtio bind device mechanism ,
> >> => https://github.com/arnopo/linux/commits/step2-virtio-in-DT
> >> step 3: Add memory declaration in VirtIO subnode
> >> => https://github.com/arnopo/linux/commits/step3-virtio-memories
> >> step 4: Add mailbox declaration in VirtIO subnode
> >> => https://github.com/arnopo/linux/commits/step4-virtio-mailboxes
> >>
> >> Arnaud Pouliquen (4):
> >> remoteproc: core: Introduce rproc_rvdev_add_device function
> >> remoteproc: core: Introduce rproc_add_rvdev function
> >> remoteproc: Move rproc_vdev management to remoteproc_virtio.c
> >> remoteproc: virtio: Create platform device for the remoteproc_virtio
> >>
> >> drivers/remoteproc/remoteproc_core.c | 154 +++---------------
> >> drivers/remoteproc/remoteproc_internal.h | 23 ++-
> >> drivers/remoteproc/remoteproc_virtio.c | 189 ++++++++++++++++++++---
> >> include/linux/remoteproc.h | 6 +-
> >> 4 files changed, 210 insertions(+), 162 deletions(-)
> >>
> >> --
> >> 2.24.3
> >>
next prev parent reply other threads:[~2022-09-20 20:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 11:52 [PATCH v8 0/4] remoteproc: restructure the remoteproc VirtIO device Arnaud Pouliquen
2022-08-26 11:52 ` [PATCH v8 1/4] remoteproc: core: Introduce rproc_rvdev_add_device function Arnaud Pouliquen
2022-08-26 11:52 ` [PATCH v8 2/4] remoteproc: core: Introduce rproc_add_rvdev function Arnaud Pouliquen
2022-08-26 11:52 ` [PATCH v8 3/4] remoteproc: Move rproc_vdev management to remoteproc_virtio.c Arnaud Pouliquen
2022-08-26 11:52 ` [PATCH v8 4/4] remoteproc: virtio: Create platform device for the remoteproc_virtio Arnaud Pouliquen
2022-09-19 22:30 ` [PATCH v8 0/4] remoteproc: restructure the remoteproc VirtIO device Mathieu Poirier
2022-09-20 13:44 ` Arnaud POULIQUEN
2022-09-20 20:22 ` Mathieu Poirier [this message]
2022-09-20 20:51 ` Mathieu Poirier
2022-09-21 13:56 ` Arnaud POULIQUEN
2022-09-21 8:54 ` Peng Fan
2022-09-21 14:07 ` Arnaud POULIQUEN
2022-09-23 10:08 ` Arnaud POULIQUEN
2022-09-26 0:47 ` Peng Fan
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=20220920202201.GB1042164@p14s \
--to=mathieu.poirier@linaro.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=bjorn.andersson@linaro.org \
--cc=bruce.ashfield@xilinx.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=robh@kernel.org \
--cc=stefanos@xilinx.com \
/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