[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31b95870-2405-4f1f-bdee-3d635e169c13@ti.com>
Date: Mon, 30 Dec 2024 09:36:49 +0530
From: Beleswar Prasad Padhi <b-padhi@...com>
To: Hari Nagalla <hnagalla@...com>, <andersson@...nel.org>,
<mathieu.poirier@...aro.org>
CC: <afd@...com>, <u-kumar1@...com>, <s-vadapalli@...com>, <srk@...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 1/3] remoteproc: k3-r5: Fix checks in
k3_r5_rproc_{mbox_callback/kick}
Hi Hari,
On 27/12/24 20:08, Hari Nagalla wrote:
> On 12/24/24 03:14, Beleswar Padhi wrote:
>> /**
>> @@ -194,8 +196,11 @@ 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)
>> + /*
>> + * Do not forward messages from a detached core, except when the
>> core
>> + * is in the process of being attached in IPC-only mode.
>> + */
>> + if (!kproc->core->is_attach_ongoing && kproc->rproc->state ==
>> RPROC_DETACHED)
>> return;
> Instead of introducing a new state variable, is it possible to use
> device virtio status?
See below related comment.
> And i wonder what if you remove this conditional check altogether? If
> the device is detached and with no virtio queues, does not the mailbox
> message gets dropped?
This check is necessary for mailbox level communication between cores.
Some Mbox messages directly use payloads like
RP_MBOX_ECHO_REQUEST/RP_MBOX_CRASH etc. which do not rely on virtqueue
read/writes for communication (see omap_remoteproc.h). In that case,
mailbox message won't be dropped even if virtio queues are not
initialized. IMO, when we say core is detached in "IPC-only" mode, this
mbox communication should also not happen. What do you think?
Powered by blists - more mailing lists