diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2015-01-27 17:33:18 +0000 |
|---|---|---|
| committer | Andriy Gapon <avg@FreeBSD.org> | 2015-01-27 17:33:18 +0000 |
| commit | 85f95fffd78f81cbbb8a948a3789e94f275bd1e2 (patch) | |
| tree | a3c6b5ecbcaa2b0c648bfbaa993539f42ebe4ab6 /sys/dev | |
| parent | 6dfa4578d6458c9531a1b1d9a17563f78751ec38 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/acpica/acpi.c | 4 | ||||
| -rw-r--r-- | sys/dev/syscons/syscons.c | 2 | ||||
| -rw-r--r-- | sys/dev/vt/vt_core.c | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 0e8998b09496..a4732c47a647 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2749,6 +2749,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) return_ACPI_STATUS (AE_OK); } + EVENTHANDLER_INVOKE(power_suspend_early); + stop_all_proc(); EVENTHANDLER_INVOKE(power_suspend); if (smp_started) { @@ -2892,6 +2894,8 @@ backout: thread_unlock(curthread); } + resume_all_proc(); + EVENTHANDLER_INVOKE(power_resume); /* Allow another sleep request after a while. */ diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 6a19523ee2ea..2ab28895a1f4 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -549,7 +549,7 @@ sc_attach_unit(int unit, int flags) /* Register suspend/resume/shutdown callbacks for the kernel console. */ if (sc_console_unit == unit) { - EVENTHANDLER_REGISTER(power_suspend, scsuspend, NULL, + EVENTHANDLER_REGISTER(power_suspend_early, scsuspend, NULL, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, scresume, NULL, EVENTHANDLER_PRI_ANY); diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index d70073090a93..47b3c8a67d93 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -2556,8 +2556,8 @@ vt_upgrade(struct vt_device *vd) vd->vd_timer_armed = 1; /* Register suspend/resume handlers. */ - EVENTHANDLER_REGISTER(power_suspend, vt_suspend_handler, vd, - EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(power_suspend_early, vt_suspend_handler, + vd, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, vt_resume_handler, vd, EVENTHANDLER_PRI_ANY); } |
