summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_ipi.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2021-02-19 07:24:05 +0300
committerAnup Patel <anup@brainfault.org>2021-03-03 11:24:50 +0300
commit50d4fde1c5a4ceb063d7f9a402769fb5be6d59ad (patch)
tree0590cebdd9fea2041c60f665797036270e874f94 /lib/sbi/sbi_ipi.c
parentb9cf617a9f15168e109a9c95989093b36b4f0135 (diff)
downloadopensbi-50d4fde1c5a4ceb063d7f9a402769fb5be6d59ad.tar.xz
lib: Remove redundant sbi_platform_ipi_clear() calls
The sbi_platform_ipi_clear() called from wait_for_coldboot() and sbi_hsm_hart_wait() is redundant because IPI will be automatically cleared by sbi_platform_ipi_init() called from sbi_ipi_init(). Further, wait_for_coldboot() is common for warm startup and warm resume path so the sbi_platform_ipi_clear() called in warm resume path cause resuming HART to miss an IPI injected other HART to wakeup the HART. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_ipi.c')
-rw-r--r--lib/sbi/sbi_ipi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c
index a3a6ce6..b50735e 100644
--- a/lib/sbi/sbi_ipi.c
+++ b/lib/sbi/sbi_ipi.c
@@ -230,7 +230,10 @@ int sbi_ipi_init(struct sbi_scratch *scratch, bool cold_boot)
ipi_data = sbi_scratch_offset_ptr(scratch, ipi_data_off);
ipi_data->ipi_type = 0x00;
- /* Platform init */
+ /*
+ * Initialize platform IPI support. This will also clear any
+ * pending IPIs for current/calling HART.
+ */
ret = sbi_platform_ipi_init(sbi_platform_ptr(scratch), cold_boot);
if (ret)
return ret;