Module Name:    src
Committed By:   dyoung
Date:           Fri Jul 29 21:21:43 UTC 2011

Modified Files:
        src/sys/arch/x86/x86: cpu.c

Log Message:
Don't shutdown the boostrap processor (BSP) because we may have to run
BIOS methods on it.  For example, ACPI requires that we execute the code
for changing sleep state on the BSP.

This may help the problem where folks' machines would hang instead of
powering off when they entered ACPI sleep state 5.

XXX If the BSP is already shut down, we should start it back up.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.89 src/sys/arch/x86/x86/cpu.c:1.90
--- src/sys/arch/x86/x86/cpu.c:1.89	Wed Jun 22 09:28:08 2011
+++ src/sys/arch/x86/x86/cpu.c	Fri Jul 29 21:21:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.89 2011/06/22 09:28:08 jruoho Exp $	*/
+/*	$NetBSD: cpu.c,v 1.90 2011/07/29 21:21:43 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.89 2011/06/22 09:28:08 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.90 2011/07/29 21:21:43 dyoung Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -1137,6 +1137,12 @@
 static bool
 cpu_shutdown(device_t dv, int how)
 {
+	struct cpu_softc *sc = device_private(dv);
+	struct cpu_info *ci = sc->sc_info;
+
+	if (ci->ci_flags & CPUF_BSP)
+		return false;
+
 	return cpu_suspend(dv, NULL);
 }
 

Reply via email to