summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroyger <royger@FreeBSD.org>2017-03-21 08:34:41 +0000
committerroyger <royger@FreeBSD.org>2017-03-21 08:34:41 +0000
commitcab548e1b8d82c03c1f82542fda82ea3ec945b7a (patch)
tree5b45781e1bb920cc1abb48e90fd8e974e0feba0b
parentf5549d54ce151c49bd71b4319ea883869080c41a (diff)
downloadFreeBSD-src-cab548e1b8d82c03c1f82542fda82ea3ec945b7a.zip
FreeBSD-src-cab548e1b8d82c03c1f82542fda82ea3ec945b7a.tar.gz
MFC r314094:
xen/timer: mark the Xen PV timer as not safe for suspension Submitted by: Liuyingdong <liuyingdong@huawei.com> Reviewed by: royger
-rw-r--r--sys/dev/xen/timer/timer.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/xen/timer/timer.c b/sys/dev/xen/timer/timer.c
index 0b26847..2e94ce7 100644
--- a/sys/dev/xen/timer/timer.c
+++ b/sys/dev/xen/timer/timer.c
@@ -417,8 +417,20 @@ xentimer_attach(device_t dev)
/* Register the timecounter. */
sc->tc.tc_name = "XENTIMER";
sc->tc.tc_quality = XENTIMER_QUALITY;
- sc->tc.tc_flags = TC_FLAGS_SUSPEND_SAFE;
/*
+ * FIXME: due to the lack of ordering during resume, FreeBSD cannot
+ * guarantee that the Xen PV timer is resumed before any other device
+ * attempts to make use of it, so mark it as not safe for suspension
+ * (ie: remove the TC_FLAGS_SUSPEND_SAFE flag).
+ *
+ * NB: This was not a problem in previous FreeBSD versions because the
+ * timer was directly attached to the nexus, but it is an issue now
+ * that the timer is attached to the xenpv bus, and thus resumed
+ * later.
+ *
+ * sc->tc.tc_flags = TC_FLAGS_SUSPEND_SAFE;
+ */
+ /*
* The underlying resolution is in nanoseconds, since the timer info
* scales TSC frequencies using a fraction that represents time in
* terms of nanoseconds.
OpenPOWER on IntegriCloud