Skip to content

Commit 98fc87f

Browse files
tnmyshJassi Brar
authored andcommitted
mailbox: zynqmp: setup IPI for each valid child node
As per zynqmp-ipi bindings, zynqmp IPI node can have multiple child nodes. Current IPI setup function is set only for first child node. If IPI node has multiple child nodes in the device-tree, then IPI setup fails for child nodes other than first child node. In such case kernel will crash. Fix this crash by registering IPI setup function for each available child node. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
1 parent b2cf36e commit 98fc87f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mailbox/zynqmp-ipi-mailbox.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,10 +940,10 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
940940
pdata->num_mboxes = num_mboxes;
941941

942942
mbox = pdata->ipi_mboxes;
943-
mbox->setup_ipi_fn = ipi_fn;
944-
945943
for_each_available_child_of_node(np, nc) {
946944
mbox->pdata = pdata;
945+
mbox->setup_ipi_fn = ipi_fn;
946+
947947
ret = zynqmp_ipi_mbox_probe(mbox, nc);
948948
if (ret) {
949949
of_node_put(nc);

0 commit comments

Comments
 (0)