forked from Mirrors/opensbi
lib: utils/ipi: Fix hartid wrongly used as hart index
Since commit78c667b6fc
("lib: sbi: Prefer hartindex over hartid in IPI framework"), The .ipi_clear callback functions take a hart index, not a hartid. However, these warm_init functions were never updated. Fixes:78c667b6fc
("lib: sbi: Prefer hartindex over hartid in IPI framework") Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
9155024972
commit
cae230c935
@@ -74,7 +74,7 @@ static struct sbi_ipi_device aclint_mswi = {
|
||||
int aclint_mswi_warm_init(void)
|
||||
{
|
||||
/* Clear IPI for current HART */
|
||||
mswi_ipi_clear(current_hartid());
|
||||
mswi_ipi_clear(current_hartindex());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -67,10 +67,8 @@ static struct sbi_ipi_device plicsw_ipi = {
|
||||
|
||||
int plicsw_warm_ipi_init(void)
|
||||
{
|
||||
u32 hartid = current_hartid();
|
||||
|
||||
/* Clear PLICSW IPI */
|
||||
plicsw_ipi_clear(hartid);
|
||||
plicsw_ipi_clear(current_hartindex());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user