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

From: Sebastian Andrzej Siewior

Date: Fri Nov 20 2026 - 06:47:18 EST


On 2026-11-19 19:51:27 [+0200], Vladimir Kondratiev wrote:
> From: Paul Burton <paul.burton@xxxxxxxx>
>
> 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@xxxxxxxx>
> [added CPC part]
> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@xxxxxxxxxxxx>

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@xxxxxxxxxxxxx>

Sebastian