]> www.infradead.org Git - users/jedix/linux-maple.git/commit
clocksource/drivers/mips-gic-timer: Always use cluster 0 counter as clocksource
authorPaul Burton <paulburton@kernel.org>
Sat, 19 Oct 2024 07:10:30 +0000 (09:10 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 13 Nov 2024 12:49:33 +0000 (13:49 +0100)
commitdfe101bcad840d025deb5e43150d54050ab7724d
treee30e52f5bc8f08644e1b7fec85e23ea2db529f47
parent314413317b6d78cc76cd48f0296fde9fcfdec400
clocksource/drivers/mips-gic-timer: Always use cluster 0 counter as clocksource

In a multi-cluster MIPS system, there are multiple GICs - one in each
cluster - each of which has its independent counter. The counters in
each GIC are not synchronized in any way, so they can drift relative
to one another through the lifetime of the system. This is problematic
for a clock source which ought to be global.

Avoid problems by always accessing cluster 0's counter, using
cross-cluster register access. This adds overhead so it is applied only
on multi-cluster systems.

Signed-off-by: Paul Burton <paulburton@kernel.org>
Signed-off-by: Chao-ying Fu <cfu@wavecomp.com>
Signed-off-by: Dragan Mladjenovic <dragan.mladjenovic@syrmia.com>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Link: https://lore.kernel.org/r/20241019071037.145314-6-arikalo@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/mips-gic-timer.c