From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Jens Wiklander <jens.wiklander@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
op-tee@lists.trustedfirmware.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/7] remoteproc: core: Add check on cached_table pointer
Date: Fri, 23 Feb 2024 11:32:47 -0700 [thread overview]
Message-ID: <Zdjkz9bgaz+QkLg1@p14s> (raw)
In-Reply-To: <20240214172127.1022199-4-arnaud.pouliquen@foss.st.com>
On Wed, Feb 14, 2024 at 06:21:23PM +0100, Arnaud Pouliquen wrote:
> Add a check on the optional rproc->cached_table to perform the memory
> copy only if it is not null.
>
> 2 use cases to support:
> - starting on boot, in which case rproc->cached_table can be null,
> - starting on crash recovery, where the cached table is used to save
> the resource table configuration on stop and re-apply the configuration
> on the re-start.
>
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
> ---
> drivers/remoteproc/remoteproc_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 283ca071e35c..34b0093689da 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -1278,7 +1278,7 @@ static int rproc_start(struct rproc *rproc, const struct firmware *fw)
> * that any subsequent changes will be applied to the loaded version.
> */
> loaded_table = rproc_find_loaded_rsc_table(rproc, fw);
> - if (loaded_table) {
> + if (loaded_table && rproc->cached_table) {
... and this becomes:
if (loaded_table != rproc->cached_table)
with a detailed comment about what is going on and a reference to
tee_rproc_parse_fw().
There are other things to adjust in this patchset but starting with that will
hopefully deal with a few of them. We can address the rest at the next
iteration.
I am done reviewing this set.
Thanks,
Mathieu
> memcpy(loaded_table, rproc->cached_table, rproc->table_sz);
> rproc->table_ptr = loaded_table;
> }
> --
> 2.25.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: op-tee@lists.trustedfirmware.org
Subject: Re: [PATCH v3 3/7] remoteproc: core: Add check on cached_table pointer
Date: Fri, 23 Feb 2024 11:32:47 -0700 [thread overview]
Message-ID: <Zdjkz9bgaz+QkLg1@p14s> (raw)
In-Reply-To: <20240214172127.1022199-4-arnaud.pouliquen@foss.st.com>
[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]
On Wed, Feb 14, 2024 at 06:21:23PM +0100, Arnaud Pouliquen wrote:
> Add a check on the optional rproc->cached_table to perform the memory
> copy only if it is not null.
>
> 2 use cases to support:
> - starting on boot, in which case rproc->cached_table can be null,
> - starting on crash recovery, where the cached table is used to save
> the resource table configuration on stop and re-apply the configuration
> on the re-start.
>
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
> ---
> drivers/remoteproc/remoteproc_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 283ca071e35c..34b0093689da 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -1278,7 +1278,7 @@ static int rproc_start(struct rproc *rproc, const struct firmware *fw)
> * that any subsequent changes will be applied to the loaded version.
> */
> loaded_table = rproc_find_loaded_rsc_table(rproc, fw);
> - if (loaded_table) {
> + if (loaded_table && rproc->cached_table) {
... and this becomes:
if (loaded_table != rproc->cached_table)
with a detailed comment about what is going on and a reference to
tee_rproc_parse_fw().
There are other things to adjust in this patchset but starting with that will
hopefully deal with a few of them. We can address the rest at the next
iteration.
I am done reviewing this set.
Thanks,
Mathieu
> memcpy(loaded_table, rproc->cached_table, rproc->table_sz);
> rproc->table_ptr = loaded_table;
> }
> --
> 2.25.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Jens Wiklander <jens.wiklander@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
op-tee@lists.trustedfirmware.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/7] remoteproc: core: Add check on cached_table pointer
Date: Fri, 23 Feb 2024 11:32:47 -0700 [thread overview]
Message-ID: <Zdjkz9bgaz+QkLg1@p14s> (raw)
In-Reply-To: <20240214172127.1022199-4-arnaud.pouliquen@foss.st.com>
On Wed, Feb 14, 2024 at 06:21:23PM +0100, Arnaud Pouliquen wrote:
> Add a check on the optional rproc->cached_table to perform the memory
> copy only if it is not null.
>
> 2 use cases to support:
> - starting on boot, in which case rproc->cached_table can be null,
> - starting on crash recovery, where the cached table is used to save
> the resource table configuration on stop and re-apply the configuration
> on the re-start.
>
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
> ---
> drivers/remoteproc/remoteproc_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 283ca071e35c..34b0093689da 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -1278,7 +1278,7 @@ static int rproc_start(struct rproc *rproc, const struct firmware *fw)
> * that any subsequent changes will be applied to the loaded version.
> */
> loaded_table = rproc_find_loaded_rsc_table(rproc, fw);
> - if (loaded_table) {
> + if (loaded_table && rproc->cached_table) {
... and this becomes:
if (loaded_table != rproc->cached_table)
with a detailed comment about what is going on and a reference to
tee_rproc_parse_fw().
There are other things to adjust in this patchset but starting with that will
hopefully deal with a few of them. We can address the rest at the next
iteration.
I am done reviewing this set.
Thanks,
Mathieu
> memcpy(loaded_table, rproc->cached_table, rproc->table_sz);
> rproc->table_ptr = loaded_table;
> }
> --
> 2.25.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-02-23 18:32 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 17:21 [PATCH v3 0/7] Introduction of a remoteproc tee to load signed firmware Arnaud Pouliquen
2024-02-14 17:22 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-14 17:21 ` [PATCH v3 1/7] remoteproc: Add TEE support Arnaud Pouliquen
2024-02-14 17:22 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-20 18:58 ` Mathieu Poirier
2024-02-20 18:58 ` Mathieu Poirier
2024-02-20 18:58 ` Mathieu Poirier
2024-02-21 8:39 ` Arnaud POULIQUEN
2024-02-21 8:41 ` Arnaud POULIQUEN
2024-02-21 8:39 ` Arnaud POULIQUEN
2024-02-22 5:42 ` Naman Jain
2024-02-22 5:42 ` Naman Jain
2024-02-22 5:42 ` Naman Jain
2024-02-23 18:27 ` Mathieu Poirier
2024-02-23 18:27 ` Mathieu Poirier
2024-02-23 18:27 ` Mathieu Poirier
2024-02-28 8:20 ` Arnaud POULIQUEN
2024-02-28 8:21 ` Arnaud POULIQUEN
2024-02-28 8:20 ` Arnaud POULIQUEN
2024-02-29 16:19 ` Mathieu Poirier
2024-02-29 16:19 ` Mathieu Poirier
2024-02-29 16:19 ` Mathieu Poirier
2024-02-29 18:26 ` Arnaud POULIQUEN
2024-02-29 18:27 ` Arnaud POULIQUEN
2024-02-29 18:26 ` Arnaud POULIQUEN
2024-02-14 17:21 ` [PATCH v3 2/7] remoteproc: Extract the firmware load from the start Arnaud Pouliquen
2024-02-14 17:22 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-14 17:21 ` [PATCH v3 3/7] remoteproc: core: Add check on cached_table pointer Arnaud Pouliquen
2024-02-14 17:22 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-23 18:32 ` Mathieu Poirier [this message]
2024-02-23 18:32 ` Mathieu Poirier
2024-02-23 18:32 ` Mathieu Poirier
2024-02-14 17:21 ` [PATCH v3 4/7] remoteproc: core: Implement the support of an alternative boot Arnaud Pouliquen
2024-02-14 17:22 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-14 17:21 ` [PATCH v3 5/7] dt-bindings: remoteproc: Add compatibility for TEE support Arnaud Pouliquen
2024-02-14 17:22 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-22 18:24 ` Rob Herring
2024-02-22 18:24 ` Rob Herring
2024-02-22 18:24 ` Rob Herring
2024-02-14 17:21 ` [PATCH v3 6/7] remoteproc: stm32: Create sub-functions to request shutdown and release Arnaud Pouliquen
2024-02-14 17:22 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-14 17:21 ` [PATCH v3 7/7] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware Arnaud Pouliquen
2024-02-14 17:23 ` Arnaud Pouliquen
2024-02-14 17:21 ` Arnaud Pouliquen
2024-02-22 19:02 ` Mathieu Poirier
2024-02-22 19:02 ` Mathieu Poirier
2024-02-22 19:02 ` Mathieu Poirier
2024-02-23 13:54 ` Arnaud POULIQUEN
2024-02-23 13:55 ` Arnaud POULIQUEN
2024-02-23 13:54 ` Arnaud POULIQUEN
2024-02-23 18:37 ` Mathieu Poirier
2024-02-23 18:37 ` Mathieu Poirier
2024-02-23 18:37 ` Mathieu Poirier
2024-02-29 18:16 ` Arnaud POULIQUEN
2024-02-29 18:17 ` Arnaud POULIQUEN
2024-02-29 18:16 ` Arnaud POULIQUEN
2024-02-22 5:43 ` [PATCH v3 0/7] Introduction of a remoteproc tee to load signed firmware Naman Jain
2024-02-22 5:44 ` Naman Jain
2024-02-22 5:43 ` Naman Jain
2024-02-22 8:47 ` Arnaud POULIQUEN
2024-02-22 8:48 ` Arnaud POULIQUEN
2024-02-22 8:47 ` Arnaud POULIQUEN
2024-02-22 9:55 ` Naman Jain
2024-02-22 9:55 ` Naman Jain
2024-02-22 9:55 ` Naman Jain
2024-02-23 14:10 ` Arnaud POULIQUEN
2024-02-23 14:11 ` Arnaud POULIQUEN
2024-02-23 14:10 ` Arnaud POULIQUEN
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=Zdjkz9bgaz+QkLg1@p14s \
--to=mathieu.poirier@linaro.org \
--cc=andersson@kernel.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jens.wiklander@linaro.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=linux-stm32@st-md-mailman.stormreply.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=robh+dt@kernel.org \
/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 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.