[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251007151828.1527105-3-tanmay.shah@amd.com>
Date: Tue, 7 Oct 2025 08:18:28 -0700
From: Tanmay Shah <tanmay.shah@....com>
To: <jassisinghbrar@...il.com>, <andersson@...nel.org>,
<mathieu.poirier@...aro.org>
CC: <linux-kernel@...r.kernel.org>, <linux-remoteproc@...r.kernel.org>, Tanmay
Shah <tanmay.shah@....com>
Subject: [PATCH v2 2/2] remoteproc: xlnx: do not kick if mbox queue is full
If MBOX_TX_QUEUE_LEN number of kicks are pending, then no need to keep
doing more kicks because it will fail anyway. Preventing further kicks
is needed because it avoids printing false positive warning messages
from mailbox framework. Functionally nothing changes from RPMsg or
remoteproc point of view.
Signed-off-by: Tanmay Shah <tanmay.shah@....com>
---
v2:
- Use msg_slot_ro to know if single slot is available in msg queue or not.
drivers/remoteproc/xlnx_r5_remoteproc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index 0b7b173d0d26..d589f31f45b9 100644
--- a/drivers/remoteproc/xlnx_r5_remoteproc.c
+++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
@@ -9,6 +9,7 @@
#include <linux/firmware/xlnx-zynqmp.h>
#include <linux/kernel.h>
#include <linux/mailbox_client.h>
+#include <linux/mailbox_controller.h>
#include <linux/mailbox/zynqmp-ipi-message.h>
#include <linux/module.h>
#include <linux/of_address.h>
@@ -335,6 +336,10 @@ static void zynqmp_r5_rproc_kick(struct rproc *rproc, int vqid)
if (!ipi)
return;
+ /* Do not need new kick as already many kicks are pending. */
+ if (ipi->tx_chan->msg_slot_ro == 0)
+ return;
+
mb_msg = (struct zynqmp_ipi_message *)ipi->tx_mc_buf;
memcpy(mb_msg->data, &vqid, sizeof(vqid));
mb_msg->len = sizeof(vqid);
--
2.34.1
Powered by blists - more mailing lists