diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-05-13 19:56:06 +0200 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-05-28 23:00:59 +0200 |
commit | 3565184ed0c1ea46bea5b792da5f72a83c43e49b (patch) | |
tree | 4846a589a6aa295634ef585e5637872f15c19993 /arch/x86/include/asm/mc146818rtc.h | |
parent | clocksource: dw_apb: Remove unused header (diff) | |
download | linux-3565184ed0c1ea46bea5b792da5f72a83c43e49b.tar.xz linux-3565184ed0c1ea46bea5b792da5f72a83c43e49b.zip |
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>
Diffstat (limited to 'arch/x86/include/asm/mc146818rtc.h')
-rw-r--r-- | arch/x86/include/asm/mc146818rtc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/mc146818rtc.h b/arch/x86/include/asm/mc146818rtc.h index d354fb781c57..a55c7efcc4ed 100644 --- a/arch/x86/include/asm/mc146818rtc.h +++ b/arch/x86/include/asm/mc146818rtc.h @@ -95,8 +95,8 @@ static inline unsigned char current_lock_cmos_reg(void) unsigned char rtc_cmos_read(unsigned char addr); void rtc_cmos_write(unsigned char val, unsigned char addr); -extern int mach_set_rtc_mmss(unsigned long nowtime); -extern unsigned long mach_get_cmos_time(void); +extern int mach_set_rtc_mmss(const struct timespec *now); +extern void mach_get_cmos_time(struct timespec *now); #define RTC_IRQ 8 |