diff options
author | royger <royger@FreeBSD.org> | 2016-05-02 16:16:08 +0000 |
---|---|---|
committer | royger <royger@FreeBSD.org> | 2016-05-02 16:16:08 +0000 |
commit | a394bd2abd40f90a6b211a64f88b645898a99050 (patch) | |
tree | a7425e2ba2299afac89a054d140754f08c36fcd9 | |
parent | e0a6b782e12a2f322f05d914e09fdec5e421db4e (diff) | |
download | FreeBSD-src-a394bd2abd40f90a6b211a64f88b645898a99050.zip FreeBSD-src-a394bd2abd40f90a6b211a64f88b645898a99050.tar.gz |
xen/time: fix PV clock resolution
The current resolution of the Xen PV clock is too high, which causes an
adjustment of 5s to be applied to it. Reduce the resolution to be the same
as the RTC plus one, so it's always selected as the best source when
available on x86.
Also don't reset the clock on resume, it's pointless and discards any
previous adjustments.
Sponsoted by: Citrix Systems R&D
-rw-r--r-- | sys/dev/xen/timer/timer.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/dev/xen/timer/timer.c b/sys/dev/xen/timer/timer.c index 8eecc60..083898c 100644 --- a/sys/dev/xen/timer/timer.c +++ b/sys/dev/xen/timer/timer.c @@ -77,7 +77,7 @@ static devclass_t xentimer_devclass; /* Xen timers may fire up to 100us off */ #define XENTIMER_MIN_PERIOD_IN_NSEC 100*NSEC_IN_USEC -#define XENCLOCK_RESOLUTION 10000000 +#define XENCLOCK_RESOLUTION 1000001 /* ATRTC resolution + 1 */ #define XENTIMER_QUALITY 950 @@ -472,9 +472,6 @@ xentimer_resume(device_t dev) /* Reset the last uptime value */ pvclock_resume(); - /* Reset the RTC clock */ - inittodr(time_second); - /* Kick the timers on all CPUs */ smp_rendezvous(NULL, xentimer_percpu_resume, NULL, dev); |