Patch "risc-v: Fix order of IPI enablement vs RCU startup" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    risc-v: Fix order of IPI enablement vs RCU startup

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     risc-v-fix-order-of-ipi-enablement-vs-rcu-startup.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 80241db3373d54810e7bbacc7aea9394850312cc
Author: Marc Zyngier <maz@xxxxxxxxxx>
Date:   Mon Jul 3 19:31:26 2023 +0100

    risc-v: Fix order of IPI enablement vs RCU startup
    
    [ Upstream commit 6259f3443c6a376aa077816ac92e9ddeb0817d09 ]
    
    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 <conor@xxxxxxxxxx>
    Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230703-dupe-frying-79ae2ccf94eb@spud
    Cc: Anup Patel <apatel@xxxxxxxxxxxxxxxx>
    Cc: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Tested-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230703183126.1567625-1-maz@xxxxxxxxxx
    Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
index 445a4efee267d..6765f1ce79625 100644
--- a/arch/riscv/kernel/smpboot.c
+++ b/arch/riscv/kernel/smpboot.c
@@ -161,10 +161,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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux