Disable interrupts before shutdownhooks are run, as all other ports.
shutdownhooks need to use polling functions (and most do).
This commit is contained in:
parent
91d4704c12
commit
687baea535
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: machdep.c,v 1.97 2008/07/02 17:28:54 ad Exp $ */
|
/* $NetBSD: machdep.c,v 1.98 2008/08/05 17:09:17 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
|
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.97 2008/07/02 17:28:54 ad Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98 2008/08/05 17:09:17 drochner Exp $");
|
||||||
|
|
||||||
/* #define XENDEBUG_LOW */
|
/* #define XENDEBUG_LOW */
|
||||||
|
|
||||||
|
@ -629,7 +629,6 @@ struct pcb dumppcb;
|
||||||
void
|
void
|
||||||
cpu_reboot(int howto, char *bootstr)
|
cpu_reboot(int howto, char *bootstr)
|
||||||
{
|
{
|
||||||
int s;
|
|
||||||
|
|
||||||
if (cold) {
|
if (cold) {
|
||||||
howto |= RB_HALT;
|
howto |= RB_HALT;
|
||||||
|
@ -647,21 +646,16 @@ cpu_reboot(int howto, char *bootstr)
|
||||||
resettodr();
|
resettodr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable interrupts. */
|
||||||
|
splhigh();
|
||||||
|
|
||||||
/* Do a dump if requested. */
|
/* Do a dump if requested. */
|
||||||
if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP) {
|
if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP)
|
||||||
/* Disable interrupts. */
|
|
||||||
s = splhigh();
|
|
||||||
dumpsys();
|
dumpsys();
|
||||||
splx(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
haltsys:
|
haltsys:
|
||||||
doshutdownhooks();
|
doshutdownhooks();
|
||||||
|
|
||||||
/* Disable interrupts. */
|
|
||||||
(void)splhigh();
|
|
||||||
|
|
||||||
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
|
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
|
||||||
#ifndef XEN
|
#ifndef XEN
|
||||||
#if NACPI > 0
|
#if NACPI > 0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: machdep.c,v 1.637 2008/07/02 17:28:55 ad Exp $ */
|
/* $NetBSD: machdep.c,v 1.638 2008/08/05 17:09:17 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 The NetBSD Foundation, Inc.
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.637 2008/07/02 17:28:55 ad Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.638 2008/08/05 17:09:17 drochner Exp $");
|
||||||
|
|
||||||
#include "opt_beep.h"
|
#include "opt_beep.h"
|
||||||
#include "opt_compat_ibcs2.h"
|
#include "opt_compat_ibcs2.h"
|
||||||
|
@ -857,7 +857,6 @@ int waittime = -1;
|
||||||
void
|
void
|
||||||
cpu_reboot(int howto, char *bootstr)
|
cpu_reboot(int howto, char *bootstr)
|
||||||
{
|
{
|
||||||
int s;
|
|
||||||
|
|
||||||
if (cold) {
|
if (cold) {
|
||||||
howto |= RB_HALT;
|
howto |= RB_HALT;
|
||||||
|
@ -876,19 +875,16 @@ cpu_reboot(int howto, char *bootstr)
|
||||||
resettodr();
|
resettodr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable interrupts. */
|
||||||
|
splhigh();
|
||||||
|
|
||||||
/* Do a dump if requested. */
|
/* Do a dump if requested. */
|
||||||
if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP) {
|
if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP)
|
||||||
s = splhigh();
|
|
||||||
dumpsys();
|
dumpsys();
|
||||||
splx(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
haltsys:
|
haltsys:
|
||||||
doshutdownhooks();
|
doshutdownhooks();
|
||||||
|
|
||||||
/* Disable interrupts. */
|
|
||||||
(void)splhigh();
|
|
||||||
|
|
||||||
#ifdef MULTIPROCESSOR
|
#ifdef MULTIPROCESSOR
|
||||||
x86_broadcast_ipi(X86_IPI_HALT);
|
x86_broadcast_ipi(X86_IPI_HALT);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue