svn commit: r299065 - head/sys/dev/xen/timer
Roger Pau Monné
royger at FreeBSD.org
Wed May 4 13:50:00 UTC 2016
Author: royger
Date: Wed May 4 13:49:59 2016
New Revision: 299065
URL: https://svnweb.freebsd.org/changeset/base/299065
Log:
xen/pvclock: set the correct resolution for the Xen PV clock
The Xen PV clock has a resolution of 1ns, so set the resolution to the
highest one that FreeBSD supports, which is 1us.
MFC after: 2 weeks
Sponsored 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 Wed May 4 13:48:59 2016 (r299064)
+++ head/sys/dev/xen/timer/timer.c Wed May 4 13:49:59 2016 (r299065)
@@ -77,7 +77,12 @@ 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 1000001 /* ATRTC resolution + 1 */
+
+/*
+ * The real resolution of the PV clock is 1ns, but the highest
+ * resolution that FreeBSD supports is 1us, so just use that.
+ */
+#define XENCLOCK_RESOLUTION 1
#define XENTIMER_QUALITY 950
More information about the svn-src-head
mailing list