svn commit: r298930 - head/sys/dev/xen/timer
Roger Pau Monné
royger at FreeBSD.org
Mon May 2 16:16:09 UTC 2016
Author: royger
Date: Mon May 2 16:16:08 2016
New Revision: 298930
URL: https://svnweb.freebsd.org/changeset/base/298930
Log:
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
Modified:
head/sys/dev/xen/timer/timer.c
Modified: head/sys/dev/xen/timer/timer.c
==============================================================================
--- head/sys/dev/xen/timer/timer.c Mon May 2 16:15:28 2016 (r298929)
+++ head/sys/dev/xen/timer/timer.c Mon May 2 16:16:08 2016 (r298930)
@@ -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);
More information about the svn-src-all
mailing list