Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/xen/control/control.c
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
#include <sys/bio.h> | #include <sys/bio.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/conf.h> | #include <sys/conf.h> | ||||
#include <sys/disk.h> | #include <sys/disk.h> | ||||
#include <sys/fcntl.h> | #include <sys/fcntl.h> | ||||
#include <sys/filedesc.h> | #include <sys/filedesc.h> | ||||
#include <sys/kdb.h> | #include <sys/kdb.h> | ||||
#include <sys/module.h> | #include <sys/module.h> | ||||
#include <sys/mount.h> | |||||
#include <sys/namei.h> | #include <sys/namei.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/reboot.h> | #include <sys/reboot.h> | ||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <sys/sched.h> | #include <sys/sched.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
#ifdef SMP | #ifdef SMP | ||||
cpuset_t cpu_suspend_map; | cpuset_t cpu_suspend_map; | ||||
#endif | #endif | ||||
EVENTHANDLER_INVOKE(power_suspend_early); | EVENTHANDLER_INVOKE(power_suspend_early); | ||||
xs_lock(); | xs_lock(); | ||||
stop_all_proc(); | stop_all_proc(); | ||||
xs_unlock(); | xs_unlock(); | ||||
suspend_all_fs(); | |||||
markj: Reading the commit log message for r314841, I don't think suspend_all_fs() needs to be done… | |||||
EVENTHANDLER_INVOKE(power_suspend); | EVENTHANDLER_INVOKE(power_suspend); | ||||
#ifdef EARLY_AP_STARTUP | #ifdef EARLY_AP_STARTUP | ||||
MPASS(mp_ncpus == 1 || smp_started); | MPASS(mp_ncpus == 1 || smp_started); | ||||
thread_lock(curthread); | thread_lock(curthread); | ||||
sched_bind(curthread, 0); | sched_bind(curthread, 0); | ||||
thread_unlock(curthread); | thread_unlock(curthread); | ||||
#else | #else | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
if (smp_started) { | if (smp_started) { | ||||
thread_lock(curthread); | thread_lock(curthread); | ||||
sched_unbind(curthread); | sched_unbind(curthread); | ||||
thread_unlock(curthread); | thread_unlock(curthread); | ||||
} | } | ||||
#endif | #endif | ||||
resume_all_fs(); | |||||
resume_all_proc(); | resume_all_proc(); | ||||
EVENTHANDLER_INVOKE(power_resume); | EVENTHANDLER_INVOKE(power_resume); | ||||
if (bootverbose) | if (bootverbose) | ||||
printf("System resumed after suspension\n"); | printf("System resumed after suspension\n"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |
Reading the commit log message for r314841, I don't think suspend_all_fs() needs to be done under the xs lock.