[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260203225821.3293475-4-tanmay.shah@amd.com>
Date: Tue, 3 Feb 2026 14:58:22 -0800
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 v4 3/3] remoteproc: xlnx: do not send new mbox notification
Only write new message to the tx mbox queue if slot is available. If
queue is full, then do not send new mbox notification.
Signed-off-by: Tanmay Shah <tanmay.shah@....com>
---
drivers/remoteproc/xlnx_r5_remoteproc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index 109831c5815c..46c20b603bc7 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>
@@ -341,7 +342,11 @@ static void zynqmp_r5_rproc_kick(struct rproc *rproc, int vqid)
int ret;
ipi = r5_core->ipi;
- if (!ipi)
+ if (!ipi || !ipi->tx_chan)
+ return;
+
+ /* Do not need new kick as already many kicks are pending. */
+ if (ipi->tx_chan->cl->tx_slots_avail_ro == 0)
return;
mb_msg = (struct zynqmp_ipi_message *)ipi->tx_mc_buf;
--
2.34.1
Powered by blists - more mailing lists