diff options
author | Will Deacon <will.deacon@arm.com> | 2012-11-29 22:48:31 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-12-05 11:20:04 +0000 |
commit | 1f75ff0a3d63606c1345e316e88a903fd43ca8be (patch) | |
tree | d326cb2f58040c910390e80f5a5287b0074a0276 /arch/arm64/include | |
parent | 45a7905fc48f6079932e77d64237cf7f008db5f4 (diff) | |
download | linux-stable-1f75ff0a3d63606c1345e316e88a903fd43ca8be.tar.gz linux-stable-1f75ff0a3d63606c1345e316e88a903fd43ca8be.tar.bz2 linux-stable-1f75ff0a3d63606c1345e316e88a903fd43ca8be.zip |
arm64: generic timer: use virtual counter instead of physical at EL0
We want to use the virtual counter at EL0, as the physical counter
may not track the current clocksource for guests running under a
hypervisor.
This patch updates the vdso and generic timer driver to use the virtual
counter. The kernel EL2 entry code is also updated to ensure that the
virtual offset is initialised to zero.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/arm_generic.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm64/include/asm/arm_generic.h b/arch/arm64/include/asm/arm_generic.h index e4cec9d30f27..df2aeb82f74e 100644 --- a/arch/arm64/include/asm/arm_generic.h +++ b/arch/arm64/include/asm/arm_generic.h @@ -70,12 +70,12 @@ static inline void __cpuinit arch_counter_enable_user_access(void) { u32 cntkctl; - /* Disable user access to the timers and the virtual counter. */ + /* Disable user access to the timers and the physical counter. */ asm volatile("mrs %0, cntkctl_el1" : "=r" (cntkctl)); - cntkctl &= ~((3 << 8) | (1 << 1)); + cntkctl &= ~((3 << 8) | (1 << 0)); - /* Enable user access to the physical counter and frequency. */ - cntkctl |= 1; + /* Enable user access to the virtual counter and frequency. */ + cntkctl |= (1 << 1); asm volatile("msr cntkctl_el1, %0" : : "r" (cntkctl)); } |