Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Move pmf_system_shutdown earlier and ensu...



details:   https://anonhg.NetBSD.org/src/rev/306853e339ca
branches:  trunk
changeset: 786792:306853e339ca
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat May 11 07:38:42 2013 +0000

description:
Move pmf_system_shutdown earlier and ensure interrupts are enabled.

diffstat:

 sys/arch/arm/arm32/arm32_reboot.c |  17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 599f6cb3de23 -r 306853e339ca sys/arch/arm/arm32/arm32_reboot.c
--- a/sys/arch/arm/arm32/arm32_reboot.c Sat May 11 07:35:58 2013 +0000
+++ b/sys/arch/arm/arm32/arm32_reboot.c Sat May 11 07:38:42 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm32_reboot.c,v 1.4 2013/05/05 10:30:21 skrll Exp $   */
+/*     $NetBSD: arm32_reboot.c,v 1.5 2013/05/11 07:38:42 skrll Exp $   */
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,7 +122,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.4 2013/05/05 10:30:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.5 2013/05/11 07:38:42 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -166,18 +166,23 @@
        if (!(howto & RB_NOSYNC))
                bootsync();
 
-       /* Say NO to interrupts */
-       splhigh();
+       /* Say NO to interrupts for the duration of the dump */
+       int s = splhigh();
 
        /* Do a dump if requested. */
        if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP)
                dumpsys();
 
+       splx(s);
+
+       pmf_system_shutdown(boothowto);
+
+       /* Say NO to interrupts for good */
+       splhigh();
+
        /* Run any shutdown hooks */
        doshutdownhooks();
 
-       pmf_system_shutdown(boothowto);
-
        /* Make sure IRQ's are disabled */
        IRQdisable;
 



Home | Main Index | Thread Index | Old Index