Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rfc: cpu_shutdown() patch
With this patch, we never shut down the bootstrap processor (BSP).
Perhaps this will help 'shutdown -p now' to work more consistently on MP
machines?
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 344-0444 x24
Index: sys/arch/x86/x86/cpu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/cpu.c,v
retrieving revision 1.89
diff -u -p -r1.89 cpu.c
--- sys/arch/x86/x86/cpu.c 22 Jun 2011 09:28:08 -0000 1.89
+++ sys/arch/x86/x86/cpu.c 25 Jul 2011 20:29:46 -0000
@@ -1137,6 +1137,12 @@ cpu_resume(device_t dv, const pmf_qual_t
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);
}
Home |
Main Index |
Thread Index |
Old Index