aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/xen
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-12-10 00:04:45 +0000
committerWarner Losh <imp@FreeBSD.org>2021-12-10 00:04:45 +0000
commitc6df6f5322f7004c71216391e1c0b374d853704a (patch)
tree76dc82f3e59048e11fc12a9f5985627e8f12b24d /sys/dev/xen
parentab639f2398bf7efd4dfd38cd6527e22f6e781ae9 (diff)
Diffstat (limited to 'sys/dev/xen')
-rw-r--r--sys/dev/xen/control/control.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c
index 234ebdf530b0..426682a8f2d9 100644
--- a/sys/dev/xen/control/control.c
+++ b/sys/dev/xen/control/control.c
@@ -232,12 +232,11 @@ xctrl_suspend()
KASSERT((PCPU_GET(cpuid) == 0), ("Not running on CPU#0"));
/*
- * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE
- * drivers need this.
+ * Be sure to hold Giant across DEVICE_SUSPEND/RESUME.
*/
- mtx_lock(&Giant);
+ bus_topo_lock();
if (DEVICE_SUSPEND(root_bus) != 0) {
- mtx_unlock(&Giant);
+ bus_topo_unlock();
printf("%s: device_suspend failed\n", __func__);
return;
}
@@ -310,7 +309,7 @@ xctrl_suspend()
* similar.
*/
DEVICE_RESUME(root_bus);
- mtx_unlock(&Giant);
+ bus_topo_unlock();
/*
* Warm up timecounter again and reset system clock.