From: Rob Herring <robh@kernel.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
"open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM"
<linux-remoteproc@vger.kernel.org>,
devicetree@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Arnaud POULIQUEN <arnaud.pouliquen@st.com>
Subject: Re: [PATCH v3 01/15] dt-bindings: remoteproc: Add bindind to support autonomous processors
Date: Thu, 10 Dec 2020 17:10:36 -0600 [thread overview]
Message-ID: <CAL_JsqKq1zM569nPLYNgj9WUHWO98nYYt6dBvHzLRMCKq5=T8g@mail.gmail.com> (raw)
In-Reply-To: <20201201234327.GA1248055@xps15>
On Tue, Dec 1, 2020 at 5:43 PM Mathieu Poirier
<mathieu.poirier@linaro.org> wrote:
>
> Hi Rob,
>
> On Mon, Nov 30, 2020 at 10:33:21AM -0700, Rob Herring wrote:
> > On Thu, Nov 26, 2020 at 02:06:28PM -0700, Mathieu Poirier wrote:
> > > This patch adds a binding to guide the remoteproc core on how to deal with
> > > remote processors in two cases:
> > >
> > > 1) When an application holding a reference to a remote processor character
> > > device interface crashes.
> > >
> > > 2) when the platform driver for a remote processor is removed.
> > >
> > > In both cases if "autonomous-on-core-reboot" is specified in the remote
> > > processor DT node, the remoteproc core will detach the remote processor
> > > rather than switching it off.
> > >
> > > Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> > > ---
> > > .../bindings/remoteproc/remoteproc-core.yaml | 25 +++++++++++++++++++
> > > 1 file changed, 25 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml b/Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml
> > > new file mode 100644
> > > index 000000000000..3032734f42a3
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml
> > > @@ -0,0 +1,25 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: "http://devicetree.org/schemas/remoteproc/remoteproc-core.yaml#"
> > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> > > +
> > > +title: Binding for the remoteproc core applicable to all remote processors
> > > +
> > > +maintainers:
> > > + - Bjorn Andersson <bjorn.andersson@linaro.org>
> > > + - Mathieu Poirier <mathieu.poirier@linaro.org>
> > > +
> > > +description:
> > > + This document defines the binding recognised by the remoteproc core that can
> > > + be used by any remote processor in the subsystem.
> > > +
> > > +properties:
> > > + autonomous-on-core-reboot:
> > > + $ref: /schemas/types.yaml#/definitions/flag
> > > + description:
> > > + Used in two situations, i.e when a user space application releases the
> > > + handle it has on the remote processor's character driver interface and
> > > + when a remote processor's platform driver is being removed. If defined,
> > > + this flag instructs the remoteproc core to detach the remote processor
> > > + rather than turning it off.
> >
> > Userspace? character driver? platform driver? remoteproc core? Please
> > explain this without OS specific terms.
>
> The remoteproc state machine is gaining in complexity and having technical terms
> in the binding's description helps understand when and how it should be used. I
> could make it more generic but that will lead to confusion and abuse.
Explaining in Linux specific terms will confuse any other OS user.
> Should I
> make it "rproc,autonomous-on-core-reboot" ?
No, 'rproc' is not a vendor.
> >
> > Seems to me this would be implied by functionality the remote proc
> > provides.
>
> Exactly - this binding is used by the remoteproc core itself. It is specified
> in the remote processor DT nodes but the individual platform drivers don't do
> anything with it - the core takes care of enacting the desired behavior on their
> behalf. Otherwise each platform driver would end up adding the same code, which
> nobody wants to see happening.
The platform drivers just need to set a flag to enable some behavior
that the core code checks and handles. That should be 1 to a few lines
in the drivers. It's not really any different, just a question of
where the flag lives.
Rob
next prev parent reply other threads:[~2020-12-10 23:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 21:06 [PATCH v3 00/15] remoteproc: Add support for detaching from rproc Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 01/15] dt-bindings: remoteproc: Add bindind to support autonomous processors Mathieu Poirier
2020-11-30 17:23 ` Rob Herring
2020-11-30 17:33 ` Rob Herring
2020-12-01 23:43 ` Mathieu Poirier
2020-12-10 23:10 ` Rob Herring [this message]
2020-11-26 21:06 ` [PATCH v3 02/15] remoteproc: Re-check state in rproc_shutdown() Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 03/15] remoteproc: Remove useless check in rproc_del() Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 04/15] remoteproc: Add new RPROC_ATTACHED state Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 05/15] remoteproc: Properly represent the attached state Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 06/15] remoteproc: Properly deal with a kernel panic when attached Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 07/15] remoteproc: Add new detach() remoteproc operation Mathieu Poirier
2020-12-02 18:13 ` Arnaud POULIQUEN
2020-11-26 21:06 ` [PATCH v3 08/15] remoteproc: Introduce function __rproc_detach() Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 09/15] remoteproc: Introduce function rproc_detach() Mathieu Poirier
2020-12-08 18:35 ` Arnaud POULIQUEN
2020-12-08 20:25 ` Mathieu Poirier
2020-12-09 0:53 ` Mathieu Poirier
2020-12-09 8:45 ` Arnaud POULIQUEN
2020-12-09 21:18 ` Mathieu Poirier
2020-12-10 8:51 ` Arnaud POULIQUEN
2020-11-26 21:06 ` [PATCH v3 10/15] remoteproc: Rename function rproc_actuate() Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 11/15] remoteproc: Add return value to function rproc_shutdown() Mathieu Poirier
2020-12-02 18:14 ` Arnaud POULIQUEN
2020-11-26 21:06 ` [PATCH v3 12/15] remoteproc: Properly deal with a stop request when attached Mathieu Poirier
2020-11-26 21:06 ` [PATCH v3 13/15] remoteproc: Properly deal with a start " Mathieu Poirier
2020-12-02 18:14 ` Arnaud POULIQUEN
2020-11-26 21:06 ` [PATCH v3 14/15] remoteproc: Properly deal with detach request Mathieu Poirier
2020-12-09 8:47 ` Arnaud POULIQUEN
2020-11-26 21:06 ` [PATCH v3 15/15] remoteproc: Refactor rproc delete and cdev release path Mathieu Poirier
2020-12-09 10:13 ` Arnaud POULIQUEN
2020-12-09 21:34 ` Mathieu Poirier
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='CAL_JsqKq1zM569nPLYNgj9WUHWO98nYYt6dBvHzLRMCKq5=T8g@mail.gmail.com' \
--to=robh@kernel.org \
--cc=arnaud.pouliquen@st.com \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=ohad@wizery.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;
as well as URLs for NNTP newsgroup(s).