summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sbi/sbi_ipi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c
index 56ba743c..bbc97f7f 100644
--- a/lib/sbi/sbi_ipi.c
+++ b/lib/sbi/sbi_ipi.c
@@ -60,6 +60,14 @@ static int sbi_ipi_send(struct sbi_scratch *scratch, u32 remote_hartindex,
remote_hartindex, data);
if (ret != SBI_IPI_UPDATE_SUCCESS)
return ret;
+ } else if (scratch == remote_scratch) {
+ /*
+ * IPI events with an update() callback are expected to return
+ * SBI_IPI_UPDATE_BREAK for self-IPIs. For other events, check
+ * for self-IPI and execute the callback directly here.
+ */
+ ipi_ops->process(scratch);
+ return 0;
}
/*