[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67eed6a8-f66c-4ca4-bf35-57f9bf6cde3a@ti.com>
Date: Mon, 7 Apr 2025 08:25:37 -0500
From: Andrew Davis <afd@...com>
To: Beleswar Padhi <b-padhi@...com>, <andersson@...nel.org>,
<mathieu.poirier@...aro.org>
CC: <hnagalla@...com>, <u-kumar1@...com>, <jm@...com>,
<jan.kiszka@...mens.com>, <christophe.jaillet@...adoo.fr>,
<jkangas@...hat.com>, <eballetbo@...hat.com>,
<linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v9 06/26] remoteproc: k3-r5: Drop check performed in
k3_r5_rproc_{mbox_callback/kick}
On 3/17/25 7:06 AM, Beleswar Padhi wrote:
> From: Siddharth Vadapalli <s-vadapalli@...com>
>
> Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during
> probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()"
> and "k3_r5_rproc_kick()" callbacks, causing them to exit if the remote
> core's state is "RPROC_DETACHED". However, the "__rproc_attach()"
> function that is responsible for attaching to a remote core, updates
> the state of the remote core to "RPROC_ATTACHED" only after invoking
> "rproc_start_subdevices()".
>
> The "rproc_start_subdevices()" function triggers the probe of the Virtio
> RPMsg devices associated with the remote core, which require that the
> "k3_r5_rproc_kick()" and "k3_r5_rproc_mbox_callback()" callbacks are
> functional. Hence, drop the check in the callbacks.
>
> Fixes: f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine")
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@...com>
> Signed-off-by: Beleswar Padhi <b-padhi@...com>
> ---
This patch seems out of place here, while you do need to do this before
the next couple patches, this patch stands alone and probably should go
at the start of the series before the start of the refactoring.
Andrew
> drivers/remoteproc/ti_k3_r5_remoteproc.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c
> index 29205d9e21af..c0e4da82775d 100644
> --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c
> +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c
> @@ -224,10 +224,6 @@ static void k3_r5_rproc_mbox_callback(struct mbox_client *client, void *data)
> const char *name = kproc->rproc->name;
> u32 msg = omap_mbox_message(data);
>
> - /* Do not forward message from a detached core */
> - if (kproc->rproc->state == RPROC_DETACHED)
> - return;
> -
> dev_dbg(dev, "mbox msg: 0x%x\n", msg);
>
> switch (msg) {
> @@ -263,10 +259,6 @@ static void k3_r5_rproc_kick(struct rproc *rproc, int vqid)
> mbox_msg_t msg = (mbox_msg_t)vqid;
> int ret;
>
> - /* Do not forward message to a detached core */
> - if (kproc->rproc->state == RPROC_DETACHED)
> - return;
> -
> /* send the index of the triggered virtqueue in the mailbox payload */
> ret = mbox_send_message(kproc->mbox, (void *)msg);
> if (ret < 0)
Powered by blists - more mailing lists