clocksource/drivers/arm_arch_timer: Move system register timer programming over to...
authorMarc Zyngier <maz@kernel.org>
Sun, 17 Oct 2021 12:42:12 +0000 (13:42 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 17 Oct 2021 19:47:05 +0000 (21:47 +0200)
commita38b71b0833eb2fabd2b1fa37d665c0a88b8b7e4
tree37d1e56f4814a8c8eb749be6bfd000201cb22a25
parent1e8d929231cf7b397101c5e6aaaa3d9bc9832f10
clocksource/drivers/arm_arch_timer: Move system register timer programming over to CVAL

In order to cope better with high frequency counters, move the
programming of the timers from the countdown timer (TVAL) over
to the comparator (CVAL).

The programming model is slightly different, as we now need to
read the current counter value to have an absolute deadline
instead of a relative one.

There is a small overhead to this change, which we will address
in the following patches.

Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-5-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
arch/arm/include/asm/arch_timer.h
arch/arm64/include/asm/arch_timer.h
drivers/clocksource/arm_arch_timer.c
include/clocksource/arm_arch_timer.h