]> Git Repo - J-linux.git/commitdiff
risc-v: Fix order of IPI enablement vs RCU startup
authorMarc Zyngier <[email protected]>
Mon, 3 Jul 2023 18:31:26 +0000 (19:31 +0100)
committerPalmer Dabbelt <[email protected]>
Wed, 5 Jul 2023 14:24:38 +0000 (07:24 -0700)
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: 832f15f42646 ("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]>
arch/riscv/kernel/smpboot.c

index bb0b76e1a6d4a2f686bac8366168cd7ba2a91071..f4d6acb38dd0dfd81653425f9717f976703ca232 100644 (file)
@@ -238,10 +238,11 @@ asmlinkage __visible void smp_callin(void)
        mmgrab(mm);
        current->active_mm = mm;
 
-       riscv_ipi_enable();
-
        store_cpu_topology(curr_cpuid);
        notify_cpu_starting(curr_cpuid);
+
+       riscv_ipi_enable();
+
        numa_add_cpu(curr_cpuid);
        set_cpu_online(curr_cpuid, 1);
        probe_vendor_features(curr_cpuid);
This page took 0.050221 seconds and 4 git commands to generate.