Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Sync cpu_reboot with i386:
details: https://anonhg.NetBSD.org/src/rev/fbd285a3732a
branches: trunk
changeset: 803441:fbd285a3732a
user: nakayama <nakayama%NetBSD.org@localhost>
date: Tue Oct 28 13:04:51 2014 +0000
description:
Sync cpu_reboot with i386:
- avoid sync and unmount after panic.
- remove vfs_shutdown, we call vfs_sync_all and vfs_unmount* instead.
- resurrect doshutdownhooks since some drivers still use it (eg. sab(4)).
diffstat:
sys/arch/sparc64/sparc64/machdep.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 0e8553b9210d -r fbd285a3732a sys/arch/sparc64/sparc64/machdep.c
--- a/sys/arch/sparc64/sparc64/machdep.c Tue Oct 28 02:49:52 2014 +0000
+++ b/sys/arch/sparc64/sparc64/machdep.c Tue Oct 28 13:04:51 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.279 2014/09/21 16:37:34 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.280 2014/10/28 13:04:51 nakayama Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.279 2014/09/21 16:37:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.280 2014/10/28 13:04:51 nakayama Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -599,10 +599,13 @@
*/
maybe_dump(howto);
- if ((howto & RB_NOSYNC) == 0 && !syncdone) {
+ /*
+ * If we've panic'd, don't make the situation potentially
+ * worse by syncing or unmounting the file systems.
+ */
+ if ((howto & RB_NOSYNC) == 0 && panicstr == NULL) {
if (!syncdone) {
- syncdone = true;
- vfs_shutdown();
+ syncdone = true;
/* XXX used to force unmount as well, here */
vfs_sync_all(l);
/*
@@ -630,6 +633,7 @@
splhigh();
haltsys:
+ doshutdownhooks();
#ifdef MULTIPROCESSOR
/* Stop all secondary cpus */
Home |
Main Index |
Thread Index |
Old Index