summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_hibernate.c
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2013-05-31 19:59:59 +0000
committermlarkin <mlarkin@openbsd.org>2013-05-31 19:59:59 +0000
commit9ecd98c6005380dddc2ef65cdaf97e13ee7ca812 (patch)
tree71195b790930973503d394998feea783d04cddbb /sys/kern/subr_hibernate.c
parentCorrect the range checks in ifconfig properly for vhid, advbase and advskew. (diff)
downloadwireguard-openbsd-9ecd98c6005380dddc2ef65cdaf97e13ee7ca812.tar.xz
wireguard-openbsd-9ecd98c6005380dddc2ef65cdaf97e13ee7ca812.zip
We need to halt the APs on MP hibernate resume or else they will be
executing code possibly causing side effects during the image unpack operation. But before we can halt the APs, we need to complete their init (as they will be hatched but idling, possibly with interrupts off). Introduces MD function hibernate_quiesce_cpus to do this, called from the MI hibernate resume code. ok deraadt
Diffstat (limited to 'sys/kern/subr_hibernate.c')
-rw-r--r--sys/kern/subr_hibernate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c
index c195ed81c95..d4e23b4a507 100644
--- a/sys/kern/subr_hibernate.c
+++ b/sys/kern/subr_hibernate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_hibernate.c,v 1.56 2013/05/30 19:00:59 mlarkin Exp $ */
+/* $OpenBSD: subr_hibernate.c,v 1.57 2013/05/31 20:00:00 mlarkin Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -1187,6 +1187,10 @@ hibernate_resume(void)
return;
}
+#ifdef MULTIPROCESSOR
+ hibernate_quiesce_cpus();
+#endif /* MULTIPROCESSOR */
+
printf("Unhibernating...\n");
/* Read the image from disk into the image (pig) area */