aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorGravatar Julien Thierry <julien.thierry@arm.com> 2017-10-13 14:32:55 +0100
committerGravatar Will Deacon <will.deacon@arm.com> 2017-10-13 18:55:05 +0100
commitec5c8e429d07737ee94ee1fd2ae5029547484194 (patch)
tree8272f13001ee42fc7ba31115a4c2d119a77b27ea /arch/arm/include/asm
parentarm64: docs: describe ELF hwcaps (diff)
downloadlinux-ec5c8e429d07737ee94ee1fd2ae5029547484194.tar.gz
linux-ec5c8e429d07737ee94ee1fd2ae5029547484194.tar.bz2
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 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/arch_timer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h
index d4ebf5679f1f..0b6e1040f9e7 100644
--- a/arch/arm/include/asm/arch_timer.h
+++ b/arch/arm/include/asm/arch_timer.h
@@ -106,6 +106,7 @@ static inline u32 arch_timer_get_cntkctl(void)
static inline void arch_timer_set_cntkctl(u32 cntkctl)
{
asm volatile("mcr p15, 0, %0, c14, c1, 0" : : "r" (cntkctl));
+ isb();
}
#endif