diff options
author | gonzo <gonzo@FreeBSD.org> | 2009-04-13 03:08:11 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2009-04-13 03:08:11 +0000 |
commit | 16b2e4b851fc13d49105bf544ef5f7d89526ed3a (patch) | |
tree | 35d65244575c98974af52810da6153780138e0d6 /sys/xen/reboot.c | |
parent | 2288c0b1828fa2a4aad02035be45876fc1eca752 (diff) | |
parent | 67227c12c0e0a27755a06861b476815955bd8b2b (diff) | |
download | FreeBSD-src-16b2e4b851fc13d49105bf544ef5f7d89526ed3a.zip FreeBSD-src-16b2e4b851fc13d49105bf544ef5f7d89526ed3a.tar.gz |
- Merge from HEAD
Diffstat (limited to 'sys/xen/reboot.c')
-rw-r--r-- | sys/xen/reboot.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/xen/reboot.c b/sys/xen/reboot.c index 892dfbf..04ba132 100644 --- a/sys/xen/reboot.c +++ b/sys/xen/reboot.c @@ -176,9 +176,9 @@ xen_suspend() /* * Bind us to CPU 0 and stop any other VCPUs. */ - mtx_lock_spin(&sched_lock); + thread_lock(curthread); sched_bind(curthread, 0); - mtx_unlock_spin(&sched_lock); + thread_unlock(curthread); KASSERT(PCPU_GET(cpuid) == 0, ("xen_suspend: not running on cpu 0")); map = PCPU_GET(other_cpus) & ~stopped_cpus; @@ -188,8 +188,10 @@ xen_suspend() if (DEVICE_SUSPEND(root_bus) != 0) { printf("xen_suspend: device_suspend failed\n"); +#ifdef SMP if (map) restart_cpus(map); +#endif return; } @@ -253,7 +255,9 @@ xen_suspend() DEVICE_RESUME(root_bus); #ifdef SMP + thread_lock(curthread); sched_unbind(curthread); + thread_unlock(curthread); if (map) restart_cpus(map); #endif |