diff options
| author | Samuel Holland <[email protected]> | 2024-08-30 19:27:43 -0700 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2024-09-27 10:42:24 +0530 |
| commit | cae230c93556517c50ba8541303d022f28e8e4ff (patch) | |
| tree | 6bc9b7e6d9d4ca084ecaffd83d9391aa1ce7a6ea /lib | |
| parent | 91550249726ddd0d90116977abbe71b0390a9a89 (diff) | |
lib: utils/ipi: Fix hartid wrongly used as hart index
Since commit 78c667b6fc07 ("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: 78c667b6fc07 ("lib: sbi: Prefer hartindex over hartid in IPI framework")
Signed-off-by: Samuel Holland <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils/ipi/aclint_mswi.c | 2 | ||||
| -rw-r--r-- | lib/utils/ipi/andes_plicsw.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/utils/ipi/aclint_mswi.c b/lib/utils/ipi/aclint_mswi.c index 4ae6bb1c..c8ebb7ac 100644 --- a/lib/utils/ipi/aclint_mswi.c +++ b/lib/utils/ipi/aclint_mswi.c @@ -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; } diff --git a/lib/utils/ipi/andes_plicsw.c b/lib/utils/ipi/andes_plicsw.c index 413ac20e..18c79e2b 100644 --- a/lib/utils/ipi/andes_plicsw.c +++ b/lib/utils/ipi/andes_plicsw.c @@ -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; } |
