Skip to content

Commit 6259f34

Browse files
Marc Zyngierpalmer-dabbelt
authored andcommitted
risc-v: Fix order of IPI enablement vs RCU startup
Conor reports that risc-v tries to enable IPIs before telling the core code to enable RCU. With the introduction of the mapple tree as a backing store for the irq descriptors, this results in a very shouty boot sequence, as RCU is legitimately upset. Restore some sanity by moving the risc_ipi_enable() call after notify_cpu_starting(), which explicitly enables RCU on the calling CPU. Fixes: 832f15f ("RISC-V: Treat IPIs as normal Linux IRQs") Reported-by: Conor Dooley <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/20230703-dupe-frying-79ae2ccf94eb@spud Cc: Anup Patel <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Linus Torvalds <[email protected]> Tested-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 62ba41d commit 6259f34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/riscv/kernel/smpboot.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,11 @@ asmlinkage __visible void smp_callin(void)
238238
mmgrab(mm);
239239
current->active_mm = mm;
240240

241-
riscv_ipi_enable();
242-
243241
store_cpu_topology(curr_cpuid);
244242
notify_cpu_starting(curr_cpuid);
243+
244+
riscv_ipi_enable();
245+
245246
numa_add_cpu(curr_cpuid);
246247
set_cpu_online(curr_cpuid, 1);
247248
probe_vendor_features(curr_cpuid);

0 commit comments

Comments
 (0)