mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tanmay Shah <tanmay.shah@amd.com>
To: <jassisinghbrar@gmail.com>, <andersson@kernel.org>,
	<mathieu.poirier@linaro.org>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-remoteproc@vger.kernel.org>,
	Tanmay Shah <tanmay.shah@amd.com>
Subject: [PATCH v4 3/3] remoteproc: xlnx: do not send new mbox notification
Date: Tue, 3 Feb 2026 14:58:22 -0800	[thread overview]
Message-ID: <20260203225821.3293475-4-tanmay.shah@amd.com> (raw)
In-Reply-To: <20260203225821.3293475-1-tanmay.shah@amd.com>

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@amd.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


      parent reply	other threads:[~2026-02-03 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 22:58 [PATCH v4 0/3] mailbox queue length check Tanmay Shah
2026-02-03 22:58 ` [PATCH v4 1/3] mailbox: check mailbox queue is full or not Tanmay Shah
2026-02-03 22:58 ` [PATCH v4 2/3] remoteproc: xlnx: assign mbox client per mbox channel Tanmay Shah
2026-02-09 23:27   ` Jassi Brar
2026-02-10 17:12     ` Shah, Tanmay
2026-02-03 22:58 ` Tanmay Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260203225821.3293475-4-tanmay.shah@amd.com \
    --to=tanmay.shah@amd.com \
    --cc=andersson@kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®