mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
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>
This commit is contained in:
@@ -107,7 +107,6 @@ void sbi_hsm_prepare_next_jump(struct sbi_scratch *scratch, u32 hartid)
|
||||
static void sbi_hsm_hart_wait(struct sbi_scratch *scratch, u32 hartid)
|
||||
{
|
||||
unsigned long saved_mie;
|
||||
const struct sbi_platform *plat = sbi_platform_ptr(scratch);
|
||||
struct sbi_hsm_data *hdata = sbi_scratch_offset_ptr(scratch,
|
||||
hart_data_offset);
|
||||
/* Save MIE CSR */
|
||||
@@ -124,8 +123,10 @@ static void sbi_hsm_hart_wait(struct sbi_scratch *scratch, u32 hartid)
|
||||
/* Restore MIE CSR */
|
||||
csr_write(CSR_MIE, saved_mie);
|
||||
|
||||
/* Clear current HART IPI */
|
||||
sbi_platform_ipi_clear(plat, hartid);
|
||||
/*
|
||||
* No need to clear IPI here because the sbi_ipi_init() will
|
||||
* clear it for current HART via sbi_platform_ipi_init().
|
||||
*/
|
||||
}
|
||||
|
||||
int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot)
|
||||
|
Reference in New Issue
Block a user