summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorBenoît Monin <benoit.monin@bootlin.com>2026-09-29 14:14:08 +0200
committerThomas Gleixner <tglx@kernel.org>2026-10-15 12:02:16 +0200
commit03c4d26933d54556a89379db5923ae9e474569e8 (patch)
tree6b41993dbaacfa94d509f66e3daf3ef4801c9ffb /scripts/Makefile.thinlto
parent3cbc11fcefc85093965f2b5bb0c4b205b02fd071 (diff)
downloadlinux-03c4d26933d54556a89379db5923ae9e474569e8.tar.gz
linux-03c4d26933d54556a89379db5923ae9e474569e8.zip
irqchip/mips-gic: Fix unbalanced cm_core_lock in for_each_online_cpu_gic()
Commit d9e2ed610a60 ("irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic()") added a gic_unlock_cluster() call to the macro's loop increment, which unconditionally invokes mips_cm_unlock_other() on multi-cluster systems. However nothing in the loop ever acquires the corresponding mips_cm_lock_other(), so on multi-cluster hardware every invocation of for_each_online_cpu_gic() releases an unheld per-CPU cm_core_lock. With CONFIG_PROVE_LOCKING this triggers a "bad unlock balance detected" warning at boot, e.g. from gic_irq_domain_map() while mapping local interrupts. Only the first occurrence is reported, since the first warning permanently disables lockdep (debug_locks = 0); the unbalanced release itself silently persists. Fix this by moving both the acquire and release into __gic_with_next_online_cpu() so they stay balanced. When advancing to a CPU in a remote cluster, lock the CM redirect block for that cluster via mips_cm_lock_other(); when leaving a remote cluster (or finishing the iteration) release it with mips_cm_unlock_other(). Local-cluster CPUs require no locking, so single-cluster systems are unaffected. This also makes the redirect region behave correctly when accessing local register blocks of CPUs in other clusters. Drop the now-unused gic_unlock_cluster() helper and its call from the for_each_online_cpu_gic() increment. Fixes: d9e2ed610a60 ("irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic()") Signed-off-by: Benoît Monin <benoit.monin@bootlin.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Link: https://patch.msgid.link/20260929-sync-gic-counters-v4-1-ec70c4b60434@bootlin.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions