Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (don't) shut down the boot processor



On Mon, Apr 04, 2011 at 05:56:07PM -0500, David Young wrote:
> I have this patch designed to avoid shutting down the boot processor
> during shutdown, which is either the job of the (ACPI) BIOS if we're
> powering down, or else is undesirable (if reboot is desired).  Is it ok
> to commit?

Ooops, here is the patch.

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.87
diff -u -p -r1.87 cpu.c
--- sys/arch/x86/x86/cpu.c      26 Feb 2011 14:43:18 -0000      1.87
+++ sys/arch/x86/x86/cpu.c      4 Apr 2011 22:16:35 -0000
@@ -1131,6 +1131,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