]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Increase precision of x86_platform.get/set_wallclock()
authorDavid Vrabel <david.vrabel@citrix.com>
Mon, 13 May 2013 17:56:06 +0000 (18:56 +0100)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 28 May 2013 21:00:59 +0000 (14:00 -0700)
commit749e3a6ead147055d54e018b01a190f51a0d3b1f
tree4846a589a6aa295634ef585e5637872f15c19993
parent46f0c5eb1b6fb4bc3576c8da1b44c151e77011ba
x86: Increase precision of x86_platform.get/set_wallclock()

All the virtualized platforms (KVM, lguest and Xen) have persistent
wallclocks that have more than one second of precision.

read_persistent_wallclock() and update_persistent_wallclock() allow
for nanosecond precision but their implementation on x86 with
x86_platform.get/set_wallclock() only allows for one second precision.
This means guests may see a wallclock time that is off by up to 1
second.

Make set_wallclock() and get_wallclock() take a struct timespec
parameter (which allows for nanosecond precision) so KVM and Xen
guests may start with a more accurate wallclock time and a Xen dom0
can maintain a more accurate wallclock for guests.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
arch/x86/include/asm/mc146818rtc.h
arch/x86/include/asm/x86_init.h
arch/x86/kernel/kvmclock.c
arch/x86/kernel/rtc.c
arch/x86/lguest/boot.c
arch/x86/platform/efi/efi.c
arch/x86/xen/time.c
include/linux/efi.h