All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: Fix IPI not initialized in riscv_cpu_setup()
@ 2026-09-04  6:07 Nikita Shubin
  2026-09-04  6:20 ` Michal Simek
  0 siblings, 1 reply; 6+ messages in thread
From: Nikita Shubin @ 2026-09-04  6:07 UTC (permalink / raw)
  To: Yao Zi, Michal Simek, u-boot
  Cc: Tim Ouyang, Leo Liang, Tom Rini, Nikita Shubin

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 <nikita.shubin@maquefel.me>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-29 18:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04  6:07 [PATCH] riscv: Fix IPI not initialized in riscv_cpu_setup() Nikita Shubin
2026-09-04  6:20 ` Michal Simek
2026-09-25 10:19   ` Nikita Shubin
2026-09-25 11:38     ` Yao Zi
2026-09-29  4:58       ` Nikita Shubin
2026-09-29 18:12         ` Leo Liang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.