diff options
author | Will Deacon | 2012-11-29 23:48:31 +0100 |
---|---|---|
committer | Catalin Marinas | 2012-12-05 12:20:04 +0100 |
commit | 1f75ff0a3d63606c1345e316e88a903fd43ca8be (patch) | |
tree | d326cb2f58040c910390e80f5a5287b0074a0276 /arch/arm64/kernel/vdso/gettimeofday.S | |
parent | arm64: vdso: defer shifting of nanosecond component of timespec (diff) | |
download | kernel-qcow2-linux-1f75ff0a3d63606c1345e316e88a903fd43ca8be.tar.gz kernel-qcow2-linux-1f75ff0a3d63606c1345e316e88a903fd43ca8be.tar.xz kernel-qcow2-linux-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/kernel/vdso/gettimeofday.S')
-rw-r--r-- | arch/arm64/kernel/vdso/gettimeofday.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/vdso/gettimeofday.S b/arch/arm64/kernel/vdso/gettimeofday.S index 6681f4032260..8bf658d974f9 100644 --- a/arch/arm64/kernel/vdso/gettimeofday.S +++ b/arch/arm64/kernel/vdso/gettimeofday.S @@ -220,9 +220,9 @@ ENTRY(__do_get_tspec) ldp w11, w12, [vdso_data, #VDSO_CS_MULT] seqcnt_read w9 - /* Read the physical counter. */ + /* Read the virtual counter. */ isb - mrs x15, cntpct_el0 + mrs x15, cntvct_el0 /* Calculate cycle delta and convert to ns. */ sub x10, x15, x10 |