]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clocksource/drivers/arm_arch_timer: Fix handling of ARM erratum 858921
authorKunkun Jiang <jiangkunkun@huawei.com>
Wed, 14 Sep 2022 06:14:24 +0000 (14:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:58:05 +0000 (09:58 +0200)
commit3da5b75beef00195a68c188ea59ad59b4ed7b67e
tree1eb461686121aa539dabf8c9d567d50c7647d4d4
parent429348d4f675e9eb418d0829064c4d7d06bd66a3
clocksource/drivers/arm_arch_timer: Fix handling of ARM erratum 858921

[ Upstream commit 6c3b62d93e195f78c1437c8fa7581e9b2f00886e ]

The commit a38b71b0833e ("clocksource/drivers/arm_arch_timer:
Move system register timer programming over to CVAL") moves the
programming of the timers from the countdown timer (TVAL) over
to the comparator (CVAL). This makes it necessary to read the
counter when programming next event. However, the workaround of
Cortex-A73 erratum 858921 does not set the corresponding
set_next_event_phys and set_next_event_virt.

Add the appropriate hooks to apply the erratum mitigation when
programming the next timer event.

Fixes: a38b71b0833e ("clocksource/drivers/arm_arch_timer: Move system register timer programming over to CVAL")
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20220914061424.1260-1-jiangkunkun@huawei.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clocksource/arm_arch_timer.c