diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2019-04-08 11:49:04 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-04-30 11:10:57 -0400 |
commit | 5ef19a161cfa88a59508979e2f39d3d092c1d5c0 (patch) | |
tree | 2772116c607252e543d024465bba3165caa99435 /arch/arm/include/asm/arch_timer.h | |
parent | dea86a80033f8b0fb25a805f46dde9f3b1a7c23a (diff) |
clocksource/arm_arch_timer: Direcly assign set_next_event workaround
When a given timer is affected by an erratum and requires an
alternative implementation of set_next_event, we do a rather
complicated dance to detect and call the workaround on each
set_next_event call.
This is clearly idiotic, as we can perfectly detect whether
this CPU requires a workaround while setting up the clock event
device.
This only requires the CPU-specific detection to be done a bit
earlier, and we can then safely override the set_next_event pointer
if we have a workaround associated to that CPU.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by; Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/include/asm/arch_timer.h')
-rw-r--r-- | arch/arm/include/asm/arch_timer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 0a8d7bba2cb0..3f0a0191f763 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h | |||
@@ -11,6 +11,10 @@ | |||
11 | #include <clocksource/arm_arch_timer.h> | 11 | #include <clocksource/arm_arch_timer.h> |
12 | 12 | ||
13 | #ifdef CONFIG_ARM_ARCH_TIMER | 13 | #ifdef CONFIG_ARM_ARCH_TIMER |
14 | /* 32bit ARM doesn't know anything about timer errata... */ | ||
15 | #define has_erratum_handler(h) (false) | ||
16 | #define erratum_handler(h) (arch_timer_##h) | ||
17 | |||
14 | int arch_timer_arch_init(void); | 18 | int arch_timer_arch_init(void); |
15 | 19 | ||
16 | /* | 20 | /* |