diff options
author | Julien Thierry <julien.thierry@arm.com> | 2017-10-13 15:32:55 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-10-13 19:55:05 +0200 |
commit | ec5c8e429d07737ee94ee1fd2ae5029547484194 (patch) | |
tree | 8272f13001ee42fc7ba31115a4c2d119a77b27ea /include/clocksource | |
parent | arm64: docs: describe ELF hwcaps (diff) | |
download | linux-ec5c8e429d07737ee94ee1fd2ae5029547484194.tar.xz linux-ec5c8e429d07737ee94ee1fd2ae5029547484194.zip |
arm_arch_timer: Expose event stream status
The arch timer configuration for a CPU might get reset after suspending
said CPU.
In order to reliably use the event stream in the kernel (e.g. for delays),
we keep track of the state where we can safely consider the event stream as
properly configured. After writing to cntkctl, we issue an ISB to ensure
that subsequent delay loops can rely on the event stream being enabled.
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'include/clocksource')
-rw-r--r-- | include/clocksource/arm_arch_timer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h index cc805b72994a..4e28283e2ec6 100644 --- a/include/clocksource/arm_arch_timer.h +++ b/include/clocksource/arm_arch_timer.h @@ -93,6 +93,7 @@ struct arch_timer_mem { extern u32 arch_timer_get_rate(void); extern u64 (*arch_timer_read_counter)(void); extern struct arch_timer_kvm_info *arch_timer_get_kvm_info(void); +extern bool arch_timer_evtstrm_available(void); #else @@ -106,6 +107,11 @@ static inline u64 arch_timer_read_counter(void) return 0; } +static inline bool arch_timer_evtstrm_available(void) +{ + return false; +} + #endif #endif |