Module Name:    src
Committed By:   mrg
Date:           Sat Sep 15 08:48:18 UTC 2018

Modified Files:
        src/sys/ddb: db_command.c

Log Message:
call spl0() before cpu_reboot(), so that there's a chance that:
- interrupts can work afterwards
- this also means if IO stalls, serial break might work again.

this mimics how reboot(2) ends up calling cpu_reboot().


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/ddb/db_command.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.157 src/sys/ddb/db_command.c:1.158
--- src/sys/ddb/db_command.c:1.157	Thu Sep 13 01:55:16 2018
+++ src/sys/ddb/db_command.c	Sat Sep 15 08:48:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.157 2018/09/13 01:55:16 mrg Exp $	*/
+/*	$NetBSD: db_command.c,v 1.158 2018/09/15 08:48:18 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.157 2018/09/13 01:55:16 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.158 2018/09/15 08:48:18 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -1355,6 +1355,8 @@ db_reboot_cmd(db_expr_t addr, bool have_
 	/* Avoid all mutex errors */
 	lockdebug_dismiss();
 	panicstr = "reboot forced via kernel debugger";
+	/* Make it possible to break into the debugger again */
+	spl0();
 	cpu_reboot((int)bootflags, NULL);
 #else	/* _KERNEL */
 	db_printf("This command can only be used in-kernel.\n");

Reply via email to