diff options
author | 2014-07-16 07:42:50 +0000 | |
---|---|---|
committer | 2014-07-16 07:42:50 +0000 | |
commit | 7882bc75851a5e1207ca424d66b9f466cbf36715 (patch) | |
tree | 1e59299125e170b588e2c30a451586ad59a6e83b /sys/dev/acpi/acpi.c | |
parent | Clean up the ifdef maze in usage() by reformatting it to have distinct (diff) | |
download | wireguard-openbsd-7882bc75851a5e1207ca424d66b9f466cbf36715.tar.xz wireguard-openbsd-7882bc75851a5e1207ca424d66b9f466cbf36715.zip |
Reenable hibernate RLE support and flush+zero all memory after unpack.
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r-- | sys/dev/acpi/acpi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index c5c920fefbc..032f24d4ecc 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.265 2014/07/12 18:48:17 tedu Exp $ */ +/* $OpenBSD: acpi.c,v 1.266 2014/07/16 07:42:50 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2162,6 +2162,13 @@ acpi_sleep_state(struct acpi_softc *sc, int state) sc->sc_state = ACPI_STATE_S0; /* Resume */ +#ifdef HIBERNATE + if (state == ACPI_STATE_S4) { + uvm_pmr_dirty_everything(); + uvm_pmr_zero_everything(); + } +#endif /* HIBERNATE */ + acpi_resume_clocks(sc); /* AML may need clocks */ acpi_resume_pm(sc, state); acpi_resume_cpu(sc); @@ -2199,7 +2206,6 @@ fail_quiesce: #ifdef HIBERNATE if (state == ACPI_STATE_S4) { hibernate_free(); - uvm_pmr_dirty_everything(); hibernate_resume_bufcache(); } #endif /* HIBERNATE */ |