Skip to content

Commit

Permalink
mailbox: zynqmp: Fix IPI isr handling
Browse files Browse the repository at this point in the history
commit 74ad37a upstream.

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: 4981b82 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
tnmysh authored and gregkh committed May 11, 2023
1 parent 15f9cff commit a3e3044
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/mailbox/zynqmp-ipi-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
struct zynqmp_ipi_message *msg;
u64 arg0, arg3;
struct arm_smccc_res res;
int ret, i;
int ret, i, status = IRQ_NONE;

(void)irq;
arg0 = SMC_IPI_MAILBOX_STATUS_ENQUIRY;
Expand All @@ -170,11 +170,11 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
memcpy_fromio(msg->data, mchan->req_buf,
msg->len);
mbox_chan_received_data(chan, (void *)msg);
return IRQ_HANDLED;
status = IRQ_HANDLED;
}
}
}
return IRQ_NONE;
return status;
}

/**
Expand Down

0 comments on commit a3e3044

Please sign in to comment.