From: Roger Quadros <rogerq@kernel.org>
To: MD Danish Anwar <danishanwar@ti.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>
Cc: Suman Anna <s-anna@ti.com>, "Andrew F . Davis" <afd@ti.com>,
nm@ti.com, vigneshr@ti.com, srk@ti.com,
linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 3/5] remoteproc: pru: Make sysfs entries read-only for PRU client driven boots
Date: Fri, 4 Nov 2022 14:57:08 +0200 [thread overview]
Message-ID: <1f1552cd-d16b-fea0-2816-9bb3a2373ff5@kernel.org> (raw)
In-Reply-To: <20221031073801.130541-4-danishanwar@ti.com>
On 31/10/2022 09:37, MD Danish Anwar wrote:
> From: Suman Anna <s-anna@ti.com>
>
> The PRU remoteproc driver is not configured for 'auto-boot' by default,
> and allows to be booted either by in-kernel PRU client drivers or by
> userspace using the generic remoteproc sysfs interfaces. The sysfs
> interfaces should not be permitted to change the remoteproc firmwares
> or states when a PRU is being managed by an in-kernel client driver.
> Use the newly introduced remoteproc generic 'sysfs_read_only' flag to
> provide these restrictions by setting and clearing it appropriately
> during the PRU acquire and release steps.
>
> Signed-off-by: Suman Anna <s-anna@ti.com>
> Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
> Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
> Signed-off-by: Puranjay Mohan <p-mohan@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
> ---
> drivers/remoteproc/pru_rproc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
> index 9ba73cfc29e2..14eb27bb5f3f 100644
> --- a/drivers/remoteproc/pru_rproc.c
> +++ b/drivers/remoteproc/pru_rproc.c
> @@ -230,6 +230,7 @@ struct rproc *pru_rproc_get(struct device_node *np, int index,
> }
>
> pru->client_np = np;
> + rproc->sysfs_read_only = true;
>
> mutex_unlock(&pru->lock);
>
> @@ -268,6 +269,7 @@ void pru_rproc_put(struct rproc *rproc)
> }
>
> pru->client_np = NULL;
> + rproc->sysfs_read_only = false;
> mutex_unlock(&pru->lock);
>
> rproc_put(rproc);
next prev parent reply other threads:[~2022-11-04 12:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 7:37 [PATCH v7 0/5] Introduce PRU remoteproc consumer API MD Danish Anwar
2022-10-31 7:37 ` [PATCH v7 1/5] dt-bindings: remoteproc: Add PRU consumer bindings MD Danish Anwar
2022-11-02 14:08 ` Rob Herring
2022-10-31 7:37 ` [PATCH v7 2/5] remoteproc: pru: Add APIs to get and put the PRU cores MD Danish Anwar
2022-11-04 12:55 ` Roger Quadros
2022-11-08 10:08 ` [EXTERNAL] " Md Danish Anwar
2022-11-08 13:25 ` Roger Quadros
2022-11-15 5:53 ` Md Danish Anwar
2022-11-15 8:34 ` Roger Quadros
2022-11-14 20:50 ` Mathieu Poirier
2022-11-15 5:59 ` Md Danish Anwar
2022-11-15 18:28 ` Mathieu Poirier
2022-10-31 7:37 ` [PATCH v7 3/5] remoteproc: pru: Make sysfs entries read-only for PRU client driven boots MD Danish Anwar
2022-11-04 12:57 ` Roger Quadros [this message]
2022-10-31 7:38 ` [PATCH v7 4/5] remoteproc: pru: Add pru_rproc_set_ctable() function MD Danish Anwar
2022-10-31 7:38 ` [PATCH v7 5/5] remoteproc: pru: Configure firmware based on client setup MD Danish Anwar
2022-11-04 13:02 ` Roger Quadros
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=1f1552cd-d16b-fea0-2816-9bb3a2373ff5@kernel.org \
--to=rogerq@kernel.org \
--cc=afd@ti.com \
--cc=danishanwar@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=s-anna@ti.com \
--cc=srk@ti.com \
--cc=vigneshr@ti.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).