clocksource/drivers/arm_arch_timer: Use stable count reader in erratum sne
authorKeqian Zhu <zhukeqian1@huawei.com>
Fri, 4 Dec 2020 07:31:25 +0000 (15:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:37 +0000 (11:53 +0100)
commitf94df0cb1e099661f20a7817183d1669f5b323b7
tree549d52f3a28234657f43be1564ab639e0b44982a
parent5acad354237daf59e3d418c7cf51db620b64ba09
clocksource/drivers/arm_arch_timer: Use stable count reader in erratum sne

[ Upstream commit d8cc3905b8073c7cfbff94af889fa8dc71f21dd5 ]

In commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter
to access stable counters"), we separate stable and normal count reader to omit
unnecessary overhead on systems that have no timer erratum.

However, in erratum_set_next_event_tval_generic(), count reader becomes normal
reader. This converts it to stable reader.

Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters")
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201204073126.6920-2-zhukeqian1@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clocksource/arm_arch_timer.c