MIPS: CPS: Optimise delay CPU calibration for SMP
authorGregory CLEMENT <gregory.clement@bootlin.com>
Fri, 11 Jul 2025 09:54:21 +0000 (11:54 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 16 Jul 2025 16:34:54 +0000 (18:34 +0200)
commitdb6f8fcd56438a078ef61779ff68068a0886a79b
tree18541c4d4dff9d2b6d0c4909d9bba384d726cff9
parentc71085f2c0f18f025784ce975358adcccaa8c041
MIPS: CPS: Optimise delay CPU calibration for SMP

On MIPS architecture with CPS-based SMP support, all CPU cores in the
same cluster run at the same frequency since they share the same L2
cache, requiring a fixed CPU/L2 cache ratio.

This allows to implement calibrate_delay_is_known(), which will return
0 (triggering calibration) only for the primary CPU of each
cluster. For other CPUs, we can simply reuse the value from their
cluster's primary CPU core.

With the introduction of this patch, a configuration running 32 cores
spread across two clusters sees a significant reduction in boot time
by approximately 600 milliseconds.

Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/smp-cps.c