Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode/dev cpu_reboot: only call thunk_abort if R...



details:   https://anonhg.NetBSD.org/src/rev/8428e2ff0f61
branches:  trunk
changeset: 768909:8428e2ff0f61
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Aug 28 21:31:41 2011 +0000

description:
cpu_reboot: only call thunk_abort if RB_DUMP is set

diffstat:

 sys/arch/usermode/dev/cpu.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r f8329d6223b1 -r 8428e2ff0f61 sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c       Sun Aug 28 21:25:11 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c       Sun Aug 28 21:31:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.21 2011/08/28 19:41:34 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.22 2011/08/28 21:31:41 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_cpu.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.21 2011/08/28 19:41:34 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.22 2011/08/28 21:31:41 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -116,6 +116,9 @@
        if ((howto & RB_POWERDOWN) == RB_POWERDOWN)
                thunk_exit(0);
 
+       if (howto & RB_DUMP)
+               thunk_abort();
+
        if (howto & RB_HALT) {
                printf("\n");
                printf("The operating system has halted.\n");
@@ -127,10 +130,6 @@
 
        printf("rebooting...\n");
 
-#if defined(DIAGNOSTIC) || defined(DEBUG)
-       thunk_abort();
-#endif
-
        usermode_reboot();
 
        /* NOTREACHED */



Home | Main Index | Thread Index | Old Index