]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/drivers/arm_arch_timer: Use event stream scaling when available
authorMarc Zyngier <maz@kernel.org>
Thu, 3 Feb 2022 17:05:02 +0000 (17:05 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 7 Mar 2022 17:27:22 +0000 (18:27 +0100)
commit1da54137f5692a7a489a136d8c8c518c87bb1875
treee00c26a8d120cf16e7c2acd006b408c9dfbe3e50
parent041f90b1c6879c2691e524ec5ac22450997be1c9
clocksource/drivers/arm_arch_timer: Use event stream scaling when available

With FEAT_ECV and the 1GHz counter, it is pretty likely that the
event stream divider doesn't fit in the field that holds the
divider value (we only have 4 bits to describe counter bits [15:0]

Thankfully, FEAT_ECV also provides a scaling mechanism to switch
the field to cover counter bits [23:8] instead.

Enable this on arm64 when ECV is available (32bit doesn't have
any detection infrastructure and is unlikely to be run on an
ARMv8.6 system anyway).

Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220203170502.2694422-1-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/arm_arch_timer.c
include/clocksource/arm_arch_timer.h