]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure
authorDing Tianhong <dingtianhong@huawei.com>
Wed, 6 Apr 2022 16:45:16 +0000 (17:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2022 05:52:14 +0000 (07:52 +0200)
commit7a48b35f0cd3174ef1654005c6e991a2c625f0d9
treed1c8d1cae0c3649307af207248c1b96c36a6324f
parentfda5a883b23742dce4bc7774f98b4c06a0a50818
clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure

commit 16d10ef29f25aba923779234bb93a451b14d20e6 upstream.

Currently we have code inline in the arch timer probe path to cater for
Freescale erratum A-008585, complete with ifdeffery. This is a little
ugly, and will get worse as we try to add more errata handling.

This patch refactors the handling of Freescale erratum A-008585. Now the
erratum is described in a generic arch_timer_erratum_workaround
structure, and the probe path can iterate over these to detect errata
and enable workarounds.

This will simplify the addition and maintenance of code handling
Hisilicon erratum 161010101.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
[Mark: split patch, correct Kconfig, reword commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/arch_timer.h
drivers/clocksource/Kconfig
drivers/clocksource/arm_arch_timer.c