diff options
author | 2011-09-20 14:06:26 +0000 | |
---|---|---|
committer | 2011-09-20 14:06:26 +0000 | |
commit | 1e2339d4b6ab56371ae6f8468cf6aaee6e6a6f70 (patch) | |
tree | bd78be217a05baec2512f184c65afd453bb88ec6 | |
parent | Use correct index for second iioq/iisq fix up. (diff) | |
download | wireguard-openbsd-1e2339d4b6ab56371ae6f8468cf6aaee6e6a6f70.tar.xz wireguard-openbsd-1e2339d4b6ab56371ae6f8468cf6aaee6e6a6f70.zip |
Very early in suspend while the clock is still ticking realtime,
save the clock back to the rtc. The zaurus already did this.
ok phessler miod kettenis
-rw-r--r-- | sys/arch/loongson/dev/apm.c | 5 | ||||
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c index 58b6cbc1185..37c2bcba289 100644 --- a/sys/arch/loongson/dev/apm.c +++ b/sys/arch/loongson/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.10 2011/09/18 12:01:06 phessler Exp $ */ +/* $OpenBSD: apm.c,v 1.11 2011/09/20 14:06:26 deraadt Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -358,6 +358,9 @@ apm_suspend() #if NSWDISPLAY > 0 wsdisplay_suspend(); #endif + + resettodr(); + bufq_quiesce(); config_suspend(TAILQ_FIRST(&alldevs), DVACT_QUIESCE); diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index c8bd966430f..8dcfbc546f0 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.227 2011/07/02 22:20:07 nicm Exp $ */ +/* $OpenBSD: acpi.c,v 1.228 2011/09/20 14:06:26 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2064,6 +2064,8 @@ acpi_prepare_sleep_state(struct acpi_softc *sc, int state) wsdisplay_suspend(); #endif /* NWSDISPLAY > 0 */ + resettodr(); + bufq_quiesce(); config_suspend(TAILQ_FIRST(&alldevs), DVACT_QUIESCE); |