Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mailbox: zynqmp: Fix IPI isr handling

Multiple IPI channels are mapped to same interrupt handler.
Current isr implementation handles only one channel per isr.
Fix this behavior by checking isr status bit of all child
mailbox nodes.

Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller")
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230311012407.1292118-3-tanmay.shah@amd.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

authored by

Tanmay Shah and committed by
Mathieu Poirier
74ad37a3 f72f805e

+3 -3
+3 -3
drivers/mailbox/zynqmp-ipi-mailbox.c
··· 152 152 struct zynqmp_ipi_message *msg; 153 153 u64 arg0, arg3; 154 154 struct arm_smccc_res res; 155 - int ret, i; 155 + int ret, i, status = IRQ_NONE; 156 156 157 157 (void)irq; 158 158 arg0 = SMC_IPI_MAILBOX_STATUS_ENQUIRY; ··· 170 170 memcpy_fromio(msg->data, mchan->req_buf, 171 171 msg->len); 172 172 mbox_chan_received_data(chan, (void *)msg); 173 - return IRQ_HANDLED; 173 + status = IRQ_HANDLED; 174 174 } 175 175 } 176 176 } 177 - return IRQ_NONE; 177 + return status; 178 178 } 179 179 180 180 /**