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>
This commit is contained in:
Will Deacon
2012-11-29 22:48:31 +00:00
committed by Catalin Marinas
parent 45a7905fc4
commit 1f75ff0a3d
4 changed files with 8 additions and 7 deletions

View File

@@ -109,7 +109,7 @@ static void __cpuinit arch_timer_setup(struct clock_event_device *clk)
enable_percpu_irq(clk->irq, 0);
/* Ensure the physical counter is visible to userspace for the vDSO. */
/* Ensure the virtual counter is visible to userspace for the vDSO. */
arch_counter_enable_user_access();
}