Skip to contentSkip to conversation

remoteproc: xlnx: do not send new mailbox notification

PATCH RESEND In review Tanmay Shah 2 participants 2 messages Aug 26 – Aug 27 Remote processor (remoteproc)

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 remoteproc: xlnx: do not send new mailbox notification

Only write a new message to the tx mbox queue if slot is available in the tx queue. If queue is full, then do not send new mbox notification.

---
 drivers/remoteproc/xlnx_r5_remoteproc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/remoteproc/xlnx_r5_remoteproc.c +4 -1
index c685bb5fa62c..0e71edf8174c 100644
@@ -381,7 +381,10 @@ 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;
+
+	if (mbox_chan_tx_slots_available(ipi->tx_chan) == 0)
 		return;
 
 	mb_msg = (struct zynqmp_ipi_message *)ipi->tx_mc_buf;

base-commit: d4d61a4b0a52e8f3cdb3e1578602850a3452ec3e

Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 10 lines · Tanmay Shah

Only write a new message to the tx mbox queue if slot is available in the tx queue. If queue is full, then do not send new mbox notification.

---
 drivers/remoteproc/xlnx_r5_remoteproc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

We are finally closing the loop on this patchset. I'll pick this up when RC1 comes out next week.

Thanks,
Mathieu

Quoted 21 lines
drivers/remoteproc/xlnx_r5_remoteproc.c +4 -1
index c685bb5fa62c..0e71edf8174c 100644
@@ -381,7 +381,10 @@ 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;
+
+       if (mbox_chan_tx_slots_available(ipi->tx_chan) == 0)
                return;
 
        mb_msg = (struct zynqmp_ipi_message *)ipi->tx_mc_buf;

base-commit: d4d61a4b0a52e8f3cdb3e1578602850a3452ec3e --
2.43.0