From 2ed46a6f7db211ae393591b23e4af577f001680e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Date: Wed, 4 May 2016 13:49:59 +0000 Subject: [PATCH] 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 --- sys/dev/xen/timer/timer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/xen/timer/timer.c b/sys/dev/xen/timer/timer.c index 083898ca0704..996399bd52f7 100644 --- a/sys/dev/xen/timer/timer.c +++ b/sys/dev/xen/timer/timer.c @@ -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