If riscv_cpu_setup() is skipped we end up with riscv_init_ipi() not
being called.
But we still use riscv_send_ipi() in spl_invoke_opensbi(), so even if
CONFIG_PHASE_CPU not set we still need init IPI and clear pending IPIs
on harts.
Fixes: d8810e1d4f82 ("riscv: Skip riscv_cpu_setup() when CPU driver is
disabled")
Signed-off-by: Nikita Shubin <[email protected]>
---
arch/riscv/cpu/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index 3bec7c7cb6d..a65e6951384 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -639,7 +639,7 @@ int riscv_cpu_setup(void)
struct udevice *dev;
if (!CONFIG_IS_ENABLED(CPU))
- return 0;
+ goto init_riscv_ipi;
uclass_find_first_device(UCLASS_CPU, &dev);
if (!dev) {
@@ -687,6 +687,7 @@ int riscv_cpu_setup(void)
#endif
}
+init_riscv_ipi:
#if CONFIG_IS_ENABLED(SMP)
ret = riscv_init_ipi();
if (ret)
---
base-commit: cc557af4553382f6f50e3ed62b9577054e7bc54f
change-id: 20260904-fix_skipped_ipi_init-aa5575f55bc4
Best regards,
--
Nikita Shubin