[PATCH v3 1/7] mips: {cm,cpc}: Make cm_core_lock, cpc_core_lock raw spinlocks

Sebastian Andrzej Siewior bigeasy at linutronix.de
Fri Nov 20 03:46:44 PST 2026


On 2026-11-19 19:51:27 [+0200], Vladimir Kondratiev wrote:
> From: Paul Burton <paul.burton at mips.com>
> 
> cm_core_lock and cpc_core_lock are used to protect access to a CPU's
> core-other/redirect CM and CPC register blocks. Since each CPU sees
> its own copy of this block, we need to ensure that critical sections
> holding a cm_core_lock run on one CPU - ie. we need to disable
> preemption.
> 
> Use raw_spinlock_t to implement cm_core_lock and cpc_core_lock in
> order to provide the guarantees we need on PREEMPT_RT systems.
> 
> Signed-off-by: Paul Burton <paul.burton at mips.com>
> [added CPC part]
> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev at mobileye.com>

The perf interrupts should be per-CPU and not threaded so this is the
right to do. However mips does not have ARCH_SUPPORTS_RT set. Is this a
longterm goal? Otherwise it doesn't matter since without it set even
lockdep dose not complain where it would otherwise.

Reviewed-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>

Sebastian



More information about the linux-arm-kernel mailing list