diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-06-26 22:40:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-06-26 22:40:01 +0000 |
commit | faf5f1c428343fb3b63d0d5c8e1f3281e5fb096a (patch) | |
tree | f68032641ab88713a1e6a1d4e8db85a94c44fa65 | |
parent | e4406dbd9a603957bda0912007302178f3920008 (diff) |
if_downall() cannot be done MI in sys_reboot() because vfs_shutdown()
might need network (ie. nfs). Move the call to the MD boot() routines.
This cause for boot hangs diagnosed by kettenis.
-rw-r--r-- | sys/arch/alpha/alpha/machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/aviion/aviion/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/landisk/landisk/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/loongson/loongson/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 28 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/octeon/octeon/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/socppc/socppc/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/solbourne/solbourne/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/vax/machdep.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_xxx.c | 4 |
23 files changed, 85 insertions, 36 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 3e88b32afe3..8cb988c406d 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.132 2011/06/05 19:41:06 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.133 2011/06/26 22:39:58 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -63,6 +63,7 @@ #include <sys/signalvar.h> #include <sys/kernel.h> #include <sys/proc.h> +#include <sys/socket.h> #include <sys/sched.h> #include <sys/buf.h> #include <sys/reboot.h> @@ -78,10 +79,13 @@ #include <sys/user.h> #include <sys/exec.h> #include <sys/exec_ecoff.h> -#include <uvm/uvm.h> #include <sys/sysctl.h> #include <sys/core.h> #include <sys/kcore.h> + +#include <net/if.h> +#include <uvm/uvm.h> + #include <machine/kcore.h> #ifndef NO_IEEE #include <machine/fpu.h> @@ -1013,6 +1017,7 @@ boot(howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 24fa0f12b5e..20c53cad618 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.143 2011/06/05 19:41:06 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.144 2011/06/26 22:39:59 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -94,6 +94,7 @@ #include <dev/cons.h> #include <stand/boot/bootarg.h> +#include <net/if.h> #include <uvm/uvm.h> #include <sys/sysctl.h> @@ -723,6 +724,7 @@ boot(int howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); delay(4*1000000); /* XXX */ diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index 5cc557fa887..f8b079414eb 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.44 2011/06/05 19:41:06 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.45 2011/06/26 22:39:59 deraadt Exp $ */ /* * Copyright (c) 2007 Miodrag Vallat. * @@ -100,6 +100,7 @@ #include <dev/cons.h> +#include <net/if.h> #include <uvm/uvm.h> #include "ksyms.h" @@ -318,6 +319,7 @@ boot(howto) else printf("WARNING: not updating battery clock\n"); } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index fad8eed9097..1a980d774fe 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.131 2011/06/05 19:41:06 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.132 2011/06/26 22:39:59 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -84,6 +84,7 @@ #include <dev/cons.h> +#include <net/if.h> #include <uvm/uvm_extern.h> #include <uvm/uvm_swap.h> @@ -603,6 +604,7 @@ boot(howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index ba91d7693cb..515bc2bc5fd 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.202 2011/06/05 19:41:06 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.203 2011/06/26 22:39:59 deraadt Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -52,6 +52,7 @@ #include <sys/mount.h> #include <sys/syscallargs.h> +#include <net/if.h> #include <uvm/uvm.h> #include <uvm/uvm_page.h> #include <uvm/uvm_swap.h> @@ -899,6 +900,7 @@ boot(int howto) else printf("WARNING: not updating battery clock\n"); } + if_downall(); /* XXX probably save howto into stable storage */ diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c index 169737b00a5..f52ca9c6b25 100644 --- a/sys/arch/hppa64/hppa64/machdep.c +++ b/sys/arch/hppa64/hppa64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.37 2011/06/05 19:41:06 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.38 2011/06/26 22:39:59 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -44,6 +44,7 @@ #include <sys/mount.h> #include <sys/syscallargs.h> +#include <net/if.h> #include <uvm/uvm.h> #include <uvm/uvm_page.h> #include <uvm/uvm_swap.h> @@ -561,6 +562,7 @@ boot(int howto) else printf("WARNING: not updating battery clock\n"); } + if_downall(); /* XXX probably save howto into stable storage */ diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index a87f5d910d0..f2d049be0fd 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.502 2011/06/26 21:46:03 tedu Exp $ */ +/* $OpenBSD: machdep.c,v 1.503 2011/06/26 22:39:59 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -99,6 +99,7 @@ #include <dev/cons.h> #include <stand/boot/bootarg.h> +#include <net/if.h> #include <uvm/uvm_extern.h> #include <uvm/uvm_swap.h> @@ -2434,6 +2435,7 @@ boot(int howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); delay(4*1000000); /* XXX */ diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c index 4e189e34fb0..0b12006638d 100644 --- a/sys/arch/landisk/landisk/machdep.c +++ b/sys/arch/landisk/landisk/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.25 2011/06/24 19:47:48 naddy Exp $ */ +/* $OpenBSD: machdep.c,v 1.26 2011/06/26 22:39:59 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ /*- @@ -78,6 +78,7 @@ #include <sys/core.h> #include <sys/kcore.h> +#include <net/if.h> #include <uvm/uvm.h> #include <dev/cons.h> @@ -210,6 +211,7 @@ boot(int howto) else printf("WARNING: not updating battery clock\n"); } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c index 0151104d072..1c5d116dd5d 100644 --- a/sys/arch/loongson/loongson/machdep.c +++ b/sys/arch/loongson/loongson/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.31 2011/06/24 19:47:48 naddy Exp $ */ +/* $OpenBSD: machdep.c,v 1.32 2011/06/26 22:39:59 deraadt Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -63,6 +63,7 @@ #include <sys/sem.h> #endif +#include <net/if.h> #include <uvm/uvm.h> #include <machine/db_machdep.h> @@ -800,6 +801,7 @@ boot(int howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); (void) splhigh(); /* Extreme priority. */ diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c index 7f24927630f..fdd98d6ebfc 100644 --- a/sys/arch/luna88k/luna88k/machdep.c +++ b/sys/arch/luna88k/luna88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.77 2011/06/05 19:41:07 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.78 2011/06/26 22:39:59 deraadt Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -91,6 +91,7 @@ #include <dev/cons.h> +#include <net/if.h> #include <uvm/uvm.h> #include "ksyms.h" @@ -481,6 +482,7 @@ boot(howto) else printf("WARNING: not updating battery clock\n"); } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index d48fdfa41b2..0d3abcc1361 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.158 2011/06/05 19:41:07 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.159 2011/06/26 22:39:59 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */ /* @@ -109,6 +109,7 @@ #include <machine/bus.h> #include <machine/pmap.h> +#include <net/if.h> #include <uvm/uvm_extern.h> #include <uvm/uvm_swap.h> @@ -502,6 +503,7 @@ boot(howto) #endif } } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 2de48354e1f..67fd5839e32 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.127 2011/06/05 19:41:07 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.128 2011/06/26 22:40:00 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -33,25 +33,30 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/signalvar.h> +#include <sys/kernel.h> +#include <sys/proc.h> +#include <sys/sched.h> #include <sys/buf.h> +#include <sys/reboot.h> +#include <sys/device.h> +#include <sys/conf.h> +#include <sys/file.h> #include <sys/timeout.h> -#include <sys/exec.h> #include <sys/malloc.h> #include <sys/mbuf.h> -#include <sys/mount.h> #include <sys/msgbuf.h> -#include <sys/proc.h> -#include <sys/signalvar.h> -#include <sys/reboot.h> -#include <sys/syscallargs.h> -#include <sys/syslog.h> -#include <sys/extent.h> -#include <sys/systm.h> +#include <sys/ioctl.h> +#include <sys/tty.h> #include <sys/user.h> -#include <sys/conf.h> +#include <sys/exec.h> +#include <sys/exec_ecoff.h> +#include <sys/sysctl.h> #include <sys/core.h> #include <sys/kcore.h> +#include <net/if.h> #include <uvm/uvm.h> #include <dev/cons.h> @@ -854,6 +859,7 @@ boot(int howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); splhigh(); diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index 26226acb906..1a581e127e8 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.125 2011/06/05 19:41:07 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.126 2011/06/26 22:40:00 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -115,6 +115,7 @@ #include <ddb/db_var.h> #endif +#include <net/if.h> #include <uvm/uvm.h> /* the following is used externally (sysctl_hw) */ @@ -480,6 +481,7 @@ boot(howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index b44065b4c3e..878d4f239a3 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.243 2011/06/05 19:41:07 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.244 2011/06/26 22:40:00 deraadt Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -81,6 +81,7 @@ #include <dev/cons.h> +#include <net/if.h> #include <uvm/uvm.h> #include "ksyms.h" @@ -424,6 +425,7 @@ boot(howto) else printf("WARNING: not updating battery clock\n"); } + if_downall(); uvm_shutdown(); splhigh(); /* Disable interrupts. */ diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 849639a665e..a723f31d488 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.67 2011/06/05 19:41:07 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.68 2011/06/26 22:40:00 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -62,6 +62,7 @@ #include <dev/cons.h> +#include <net/if.h> #include <uvm/uvm_extern.h> #ifdef DDB @@ -616,6 +617,7 @@ boot(howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); splhigh(); diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index b059e904fac..3b4441a959a 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.14 2011/06/24 19:47:48 naddy Exp $ */ +/* $OpenBSD: machdep.c,v 1.15 2011/06/26 22:40:00 deraadt Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -63,6 +63,7 @@ #include <sys/sem.h> #endif +#include <net/if.h> #include <uvm/uvm.h> #include <uvm/uvm_extern.h> @@ -676,6 +677,7 @@ boot(int howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); (void) splhigh(); /* Extreme priority. */ diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index dd6e701ad16..eb6f75a5c4e 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.111 2011/06/24 19:47:49 naddy Exp $ */ +/* $OpenBSD: machdep.c,v 1.112 2011/06/26 22:40:00 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -47,6 +47,7 @@ #include <sys/sem.h> #endif +#include <net/if.h> #include <uvm/uvm.h> #include <machine/db_machdep.h> @@ -703,6 +704,7 @@ boot(int howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); (void) splhigh(); /* Extreme priority. */ diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c index 461349e2a37..7f0a6644adb 100644 --- a/sys/arch/socppc/socppc/machdep.c +++ b/sys/arch/socppc/socppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.30 2011/06/05 19:41:08 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.31 2011/06/26 22:40:00 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -48,6 +48,7 @@ #include <sys/tty.h> #include <sys/user.h> +#include <net/if.h> #include <uvm/uvm.h> #include <machine/bat.h> @@ -1062,6 +1063,7 @@ boot(int howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); splhigh(); diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c index 8ed93171043..8094212c335 100644 --- a/sys/arch/solbourne/solbourne/machdep.c +++ b/sys/arch/solbourne/solbourne/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.19 2011/06/05 19:41:08 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.20 2011/06/26 22:40:00 deraadt Exp $ */ /* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */ /* @@ -62,6 +62,7 @@ #include <sys/sysctl.h> #include <sys/extent.h> +#include <net/if.h> #include <uvm/uvm.h> #include <dev/rndvar.h> @@ -554,6 +555,7 @@ boot(howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); (void) splhigh(); /* ??? */ diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 7b6abc25661..4cfb2f1a775 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.135 2011/06/05 19:41:08 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.136 2011/06/26 22:40:00 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -62,6 +62,7 @@ #include <sys/sysctl.h> #include <sys/extent.h> +#include <net/if.h> #include <uvm/uvm.h> #include <dev/rndvar.h> @@ -567,6 +568,7 @@ boot(howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); (void) splhigh(); /* ??? */ diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 6f950c279af..024f96b3a08 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.134 2011/06/24 19:47:49 naddy Exp $ */ +/* $OpenBSD: machdep.c,v 1.135 2011/06/26 22:40:00 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -91,6 +91,7 @@ #include <sys/syscallargs.h> #include <sys/exec.h> +#include <net/if.h> #include <uvm/uvm.h> #include <sys/sysctl.h> @@ -657,6 +658,7 @@ boot(howto) printf("WARNING: not updating battery clock\n"); } } + if_downall(); uvm_shutdown(); (void) splhigh(); /* ??? */ diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index cc1708640b7..3dc02eda7c2 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.114 2011/06/05 19:41:08 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.115 2011/06/26 22:40:00 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -74,6 +74,7 @@ #include <dev/cons.h> +#include <net/if.h> #include <uvm/uvm.h> #include <net/if.h> @@ -540,6 +541,7 @@ boot(howto) */ resettodr(); } + if_downall(); uvm_shutdown(); splhigh(); /* extreme priority */ diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index c03be03e462..41166b3e20c 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_xxx.c,v 1.18 2010/07/28 16:15:25 deraadt Exp $ */ +/* $OpenBSD: kern_xxx.c,v 1.19 2011/06/26 22:40:00 deraadt Exp $ */ /* $NetBSD: kern_xxx.c,v 1.32 1996/04/22 01:38:41 christos Exp $ */ /* @@ -74,8 +74,6 @@ sys_reboot(struct proc *p, void *v, register_t *retval) sched_stop_secondary_cpus(); #endif - if_downall(); - boot(SCARG(uap, opt)); atomic_clearbits_int(&p->p_flag, P_CPUPEG); /* XXX */ |