Re: [PATCH v2] mips: mm: Call rcutree_report_cpu_starting() even earlier
From: Maciej W. Rozycki
Date: Fri Apr 10 2026 - 09:11:20 EST
On Thu, 9 Apr 2026, Stefan Wiehler wrote:
> rcutree_report_cpu_starting() must be called on secondary CPUs before
> allocating memory to avoid the following Lockdep-RCU splat when
> CONFIG_PROVE_RCU_LIST=y:
>
> WARNING: suspicious RCU usage
> 6.6.119-00d46e15c416-fct #1 Not tainted
> -----------------------------
> /kernel/locking/lockdep.c:3762 RCU-list traversed in non-reader section!!
I have tried to verify your change here, but the warning does not trigger
with 6.19 as released and CONFIG_SIBYTE_SWARM as the platform (2-way SMP).
$ grep CONFIG_PROVE_RCU_LIST .config
CONFIG_PROVE_RCU_LIST=y
$
Am I missing anything here, anything extra to enable?
> See also commit 55702ec9603e ("mips/smp: Call
> rcutree_report_cpu_starting() earlier").
>
> Fixes: 231ac951faba ("MIPS: mm: kmalloc tlb_vpn array to avoid stack overflow")
This does not appear to be a valid commit hash upstream; this is commit
841ecc979b18 AFAICS.
> diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
> index 4868e79f3b30..bdb47c70d4f5 100644
> --- a/arch/mips/kernel/smp.c
> +++ b/arch/mips/kernel/smp.c
> @@ -359,8 +359,8 @@ asmlinkage void start_secondary(void)
> unsigned int cpu = raw_smp_processor_id();
>
> cpu_probe();
> - per_cpu_trap_init(false);
> rcutree_report_cpu_starting(cpu);
> + per_cpu_trap_init(false);
> mips_clockevent_init();
> mp_ops->init_secondary();
> cpu_report();
As I noted in my previous message: is there any reason for cpu_probe() to
precede this call?
Maciej