Module Name: src Committed By: msaitoh Date: Sun Nov 9 06:55:14 UTC 2014
Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6-1]: machdep.c Log Message: Pull up following revision(s) (requested by nakayama in ticket #1176): sys/arch/sparc64/sparc64/machdep.c: revision 1.280 sys/arch/sparc64/sparc64/machdep.c: revision 1.274 Remove duplicate/unused declarations. 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)). To generate a diff of this commit: cvs rdiff -u -r1.265.2.1 -r1.265.2.1.6.1 \ src/sys/arch/sparc64/sparc64/machdep.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/arch/sparc64/sparc64/machdep.c diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.265.2.1 src/sys/arch/sparc64/sparc64/machdep.c:1.265.2.1.6.1 --- src/sys/arch/sparc64/sparc64/machdep.c:1.265.2.1 Mon May 21 15:25:56 2012 +++ src/sys/arch/sparc64/sparc64/machdep.c Sun Nov 9 06:55:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.265.2.1 2012/05/21 15:25:56 riz Exp $ */ +/* $NetBSD: machdep.c,v 1.265.2.1.6.1 2014/11/09 06:55:14 msaitoh 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.265.2.1 2012/05/21 15:25:56 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.265.2.1.6.1 2014/11/09 06:55:14 msaitoh Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -156,13 +156,10 @@ extern vaddr_t avail_end; #ifdef MODULAR vaddr_t module_start, module_end; static struct vm_map module_map_store; -extern struct vm_map *module_map; #endif int physmem; -extern void *msgbufaddr; - /* * Maximum number of DMA segments we'll allow in dmamem_load() * routines. Can be overridden in config files, etc. @@ -609,12 +606,13 @@ cpu_reboot(int howto, char *user_boot_st */ maybe_dump(howto); - if ((howto & RB_NOSYNC) == 0 && !syncdone) { - extern struct lwp lwp0; - + /* + * 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); /* @@ -642,6 +640,7 @@ cpu_reboot(int howto, char *user_boot_st splhigh(); haltsys: + doshutdownhooks(); #ifdef MULTIPROCESSOR /* Stop all secondary cpus */