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().
This commit is contained in:
parent
3ea8e2fb39
commit
e8bf3d6996
|
@ -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_addr,
|
|||
/* 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");
|
||||
|
|
Loading…
Reference in New Issue