Re: [PATCH 1/3] remoteproc: k3-r5: Fix checks in k3_r5_rproc_{mbox_callback/kick}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?





[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux