From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: andersson@kernel.org, matthias.bgg@gmail.com,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH] remoteproc: mediatek: Zero out only remaining bytes of IPI buffer
Date: Tue, 21 May 2024 10:47:33 -0600 [thread overview]
Message-ID: <ZkzQJepyjPz4Su+k@p14s> (raw)
In-Reply-To: <20240520112724.139945-1-angelogioacchino.delregno@collabora.com>
On Mon, May 20, 2024 at 01:27:24PM +0200, AngeloGioacchino Del Regno wrote:
> In scp_ipi_handler(), instead of zeroing out the entire shared
> buffer, which may be as large as 600 bytes, overwrite it with the
> received data, then zero out only the remaining bytes.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/remoteproc/mtk_scp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index e5214d43181e..dc70cf7db44d 100644
> --- a/drivers/remoteproc/mtk_scp.c
> +++ b/drivers/remoteproc/mtk_scp.c
> @@ -117,8 +117,8 @@ static void scp_ipi_handler(struct mtk_scp *scp)
> return;
> }
>
> - memset(scp->share_buf, 0, scp_sizes->ipi_share_buffer_size);
> memcpy_fromio(scp->share_buf, &rcv_obj->share_buf, len);
> + memset(&scp->share_buf[len], 0, scp_sizes->ipi_share_buffer_size - len);
I will apply this patch when rc1 comes out next week.
Thanks,
Mathieu
> handler(scp->share_buf, len, ipi_desc[id].priv);
> scp_ipi_unlock(scp, id);
>
> --
> 2.45.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: andersson@kernel.org, matthias.bgg@gmail.com,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH] remoteproc: mediatek: Zero out only remaining bytes of IPI buffer
Date: Tue, 21 May 2024 10:47:33 -0600 [thread overview]
Message-ID: <ZkzQJepyjPz4Su+k@p14s> (raw)
In-Reply-To: <20240520112724.139945-1-angelogioacchino.delregno@collabora.com>
On Mon, May 20, 2024 at 01:27:24PM +0200, AngeloGioacchino Del Regno wrote:
> In scp_ipi_handler(), instead of zeroing out the entire shared
> buffer, which may be as large as 600 bytes, overwrite it with the
> received data, then zero out only the remaining bytes.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/remoteproc/mtk_scp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index e5214d43181e..dc70cf7db44d 100644
> --- a/drivers/remoteproc/mtk_scp.c
> +++ b/drivers/remoteproc/mtk_scp.c
> @@ -117,8 +117,8 @@ static void scp_ipi_handler(struct mtk_scp *scp)
> return;
> }
>
> - memset(scp->share_buf, 0, scp_sizes->ipi_share_buffer_size);
> memcpy_fromio(scp->share_buf, &rcv_obj->share_buf, len);
> + memset(&scp->share_buf[len], 0, scp_sizes->ipi_share_buffer_size - len);
I will apply this patch when rc1 comes out next week.
Thanks,
Mathieu
> handler(scp->share_buf, len, ipi_desc[id].priv);
> scp_ipi_unlock(scp, id);
>
> --
> 2.45.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-05-21 16:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 11:27 [PATCH] remoteproc: mediatek: Zero out only remaining bytes of IPI buffer AngeloGioacchino Del Regno
2024-05-20 11:27 ` AngeloGioacchino Del Regno
2024-05-20 15:01 ` Mukesh Ojha
2024-05-20 15:01 ` Mukesh Ojha
2024-05-21 16:47 ` Mathieu Poirier [this message]
2024-05-21 16:47 ` 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=ZkzQJepyjPz4Su+k@p14s \
--to=mathieu.poirier@linaro.org \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=matthias.bgg@gmail.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 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.