From 9ecd98c6005380dddc2ef65cdaf97e13ee7ca812 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Fri, 31 May 2013 19:59:59 +0000 Subject: 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 --- sys/kern/subr_hibernate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/kern/subr_hibernate.c') 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 @@ -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 */ -- cgit v1.2.3-59-g8ed1b