linux/drivers/clocksource
Mark Rutland 0d651e4e65 clocksource: arch_timer: use virtual counters
Switching between reading the virtual or physical counters is
problematic, as some core code wants a view of time before we're fully
set up. Using a function pointer and switching the source after the
first read can make time appear to go backwards, and having a check in
the read function is an unfortunate block on what we want to be a fast
path.

Instead, this patch makes us always use the virtual counters. If we're a
guest, or don't have hyp mode, we'll use the virtual timers, and as such
don't care about CNTVOFF as long as it doesn't change in such a way as
to make time appear to travel backwards. As the guest will use the
virtual timers, a (potential) KVM host must use the physical timers
(which can wake up the host even if they fire while a guest is
executing), and hence a host must have CNTVOFF set to zero so as to have
a consistent view of time between the physical timers and virtual
counters.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Rob Herring <rob.herring@calxeda.com>
2013-06-07 10:20:28 +01:00
..
acpi_pm.c
arm_arch_timer.c clocksource: arch_timer: use virtual counters 2013-06-07 10:20:28 +01:00
bcm2835_timer.c clocksource: pass DT node pointer to init functions 2013-03-11 08:42:07 -05:00
bcm_kona_timer.c ARM: bcm281xx: Add timer driver (driver portion) 2013-03-28 10:58:55 -07:00
cadence_ttc_timer.c arm: zynq: Move timer to generic location 2013-04-04 09:22:09 +02:00
clksrc-dbx500-prcmu.c ARM: ux500: make remaining headers local 2013-04-08 13:59:48 +02:00
clksrc-of.c clocksource: make CLOCKSOURCE_OF_DECLARE type safe 2013-03-28 12:01:06 +01:00
cs5535-clockevt.c
cyclone.c
dw_apb_timer_of.c
dw_apb_timer.c
em_sti.c clocksource: em_sti: Set initcall level to subsys 2013-03-13 02:24:36 +09:00
exynos_mct.c ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
i8253.c
Kconfig ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
Makefile ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
metag_generic.c metag: Time keeping 2013-03-02 20:09:22 +00:00
mmio.c
mxs_timer.c clocksource: mxs_timer: Add semicolon at end of line 2013-04-03 10:30:08 +08:00
nomadik-mtu.c clocksource: nomadik-mtu: fix up clocksource/timer 2013-04-26 17:10:46 -07:00
samsung_pwm_timer.c clocksource: samsung_pwm_timer: Work around rounding errors in clockevents core 2013-04-28 12:17:05 -07:00
scx200_hrt.c
sh_cmt.c clocksource: sh_cmt: Set initcall level to subsys 2013-03-13 02:24:36 +09:00
sh_mtu2.c clocksource: sh_mtu2: Set initcall level to subsys 2013-03-13 02:24:37 +09:00
sh_tmu.c clocksource: sh_tmu: Set initcall level to subsys 2013-03-13 02:24:36 +09:00
sun4i_timer.c clocksource: sunxi: Rename sunxi to sun4i 2013-04-08 21:42:11 +02:00
tcb_clksrc.c
tegra20_timer.c Merge branch 'tegra/soc' into next/drivers 2013-04-09 17:07:36 +02:00
time-armada-370-xp.c clocksource: time-armada-370-xp: add local timer support 2013-02-28 18:57:07 +01:00
timer-marco.c ARM: sirf: use clocksource_of infrastructure 2013-03-25 12:29:41 +01:00
timer-prima2.c ARM: sirf: use clocksource_of infrastructure 2013-03-25 12:29:41 +01:00
vt8500_timer.c clocksource: make CLOCKSOURCE_OF_DECLARE type safe 2013-03-28 12:01:06 +01:00