Index: sys/arch/acorn26/acorn26/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn26/acorn26/machdep.c,v
retrieving revision 1.18
diff -u -r1.18 machdep.c
--- sys/arch/acorn26/acorn26/machdep.c  24 Dec 2005 22:45:33 -0000      1.18
+++ sys/arch/acorn26/acorn26/machdep.c  22 Apr 2006 17:05:36 -0000
@@ -105,7 +105,7 @@
#endif

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

haltsys:
       if (howto & RB_HALT) {
Index: sys/arch/acorn32/acorn32/hydra.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/acorn32/hydra.c,v
retrieving revision 1.20
diff -u -r1.20 hydra.c
--- sys/arch/acorn32/acorn32/hydra.c    8 Dec 2005 22:41:44 -0000       1.20
+++ sys/arch/acorn32/acorn32/hydra.c    22 Apr 2006 17:05:37 -0000
@@ -71,7 +71,7 @@
static int hydra_print(void *, char const *);
static int hydra_submatch(struct device *, struct cfdata *,
                         const int *, void *);
-static void hydra_shutdown(void *);
+static void hydra_shutdown(int, void *);

static void hydra_reset(struct hydra_softc *);

@@ -261,7 +261,7 @@
}

static void
-hydra_shutdown(void *arg)
+hydra_shutdown(int howto, void *arg)
{
       struct hydra_softc *sc = arg;

Index: sys/arch/acorn32/acorn32/rpc_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/acorn32/rpc_machdep.c,v
retrieving revision 1.61
diff -u -r1.61 rpc_machdep.c
--- sys/arch/acorn32/acorn32/rpc_machdep.c      11 Dec 2005 12:16:05 -0000      1.61
+++ sys/arch/acorn32/acorn32/rpc_machdep.c      22 Apr 2006 17:05:38 -0000
@@ -269,7 +269,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("Halted while still in the ICE age.\n");
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
@@ -338,7 +338,7 @@
                   cmos_read(RTC_ADDR_BOOTOPTS) | 0x02);

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c,v
retrieving revision 1.3
diff -u -r1.3 eb7500atx_machdep.c
--- sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c      11 Dec 2005 12:16:05 -0000      1.3
+++ sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c      22 Apr 2006 17:05:39 -0000
@@ -268,7 +268,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("Halted while still in the ICE age.\n");
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
@@ -308,7 +308,7 @@
        */

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/acorn32/mainbus/com_pioc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/mainbus/com_pioc.c,v
retrieving revision 1.10
diff -u -r1.10 com_pioc.c
--- sys/arch/acorn32/mainbus/com_pioc.c 11 Dec 2005 12:16:05 -0000      1.10
+++ sys/arch/acorn32/mainbus/com_pioc.c 22 Apr 2006 17:05:39 -0000
@@ -101,7 +101,7 @@

static int  com_pioc_probe   __P((struct device *, struct cfdata *, void *));
static void com_pioc_attach  __P((struct device *, struct device *, void *));
-static void com_pioc_cleanup __P((void *));
+static void com_pioc_cleanup __P((int, void *));

/* device attach structure */

@@ -213,7 +213,7 @@
}

/*
- * void com_pioc_cleanup(void *arg)
+ * void com_pioc_cleanup(int howto, void *arg)
 *
 * clean up driver
 */
Index: sys/arch/acorn32/podulebus/amps.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/podulebus/amps.c,v
retrieving revision 1.11
diff -u -r1.11 amps.c
--- sys/arch/acorn32/podulebus/amps.c   11 Dec 2005 12:16:05 -0000      1.11
+++ sys/arch/acorn32/podulebus/amps.c   22 Apr 2006 17:05:40 -0000
@@ -100,7 +100,7 @@
    amps_probe, amps_attach, NULL, NULL);

int    amps_print(void *, const char *);
-void   amps_shutdown(void *);
+void   amps_shutdown(int, void *);

/*
 * Attach arguments for child devices.
@@ -208,7 +208,8 @@
 */

/*void
-amps_shutdown(arg)
+amps_shutdown(howto, arg)
+       int howto;
       void *arg;
{
}*/
Index: sys/arch/acorn32/podulebus/icside.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/podulebus/icside.c,v
retrieving revision 1.25
diff -u -r1.25 icside.c
--- sys/arch/acorn32/podulebus/icside.c 16 Jan 2006 20:30:18 -0000      1.25
+++ sys/arch/acorn32/podulebus/icside.c 22 Apr 2006 17:05:41 -0000
@@ -100,7 +100,7 @@
int    icside_probe(struct device *, struct cfdata *, void *);
void   icside_attach(struct device *, struct device *, void *);
int    icside_intr(void *);
-void   icside_v6_shutdown(void *);
+void   icside_v6_shutdown(int, void *);

CFATTACH_DECL(icside, sizeof(struct icside_softc),
    icside_probe, icside_attach, NULL, NULL);
@@ -322,7 +322,7 @@
 * RISC OS will see it.
 */
void
-icside_v6_shutdown(void *arg)
+icside_v6_shutdown(int howto, void *arg)
{
       struct icside_softc *sc = arg;

Index: sys/arch/acorn32/podulebus/rapide.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/podulebus/rapide.c,v
retrieving revision 1.24
diff -u -r1.24 rapide.c
--- sys/arch/acorn32/podulebus/rapide.c 16 Jan 2006 20:30:18 -0000      1.24
+++ sys/arch/acorn32/podulebus/rapide.c 22 Apr 2006 17:05:41 -0000
@@ -128,7 +128,7 @@

int    rapide_probe    __P((struct device *, struct cfdata *, void *));
void   rapide_attach   __P((struct device *, struct device *, void *));
-void   rapide_shutdown __P((void *arg));
+void   rapide_shutdown __P((int howto, void *arg));
int    rapide_intr     __P((void *));

CFATTACH_DECL(rapide, sizeof(struct rapide_softc),
@@ -326,7 +326,8 @@
 */

void
-rapide_shutdown(arg)
+rapide_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct rapide_softc *sc = arg;
Index: sys/arch/acorn32/podulebus/simide.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/podulebus/simide.c,v
retrieving revision 1.23
diff -u -r1.23 simide.c
--- sys/arch/acorn32/podulebus/simide.c 16 Jan 2006 20:30:18 -0000      1.23
+++ sys/arch/acorn32/podulebus/simide.c 22 Apr 2006 17:05:42 -0000
@@ -98,7 +98,7 @@

int    simide_probe    __P((struct device *, struct cfdata *, void *));
void   simide_attach   __P((struct device *, struct device *, void *));
-void   simide_shutdown __P((void *arg));
+void   simide_shutdown __P((int howto, void *arg));
int    simide_intr     __P((void *arg));

CFATTACH_DECL(simide, sizeof(struct simide_softc),
@@ -314,7 +314,8 @@
 */

void
-simide_shutdown(arg)
+simide_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct simide_softc *sc = arg;
Index: sys/arch/algor/algor/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/algor/algor/machdep.c,v
retrieving revision 1.31
diff -u -r1.31 machdep.c
--- sys/arch/algor/algor/machdep.c      9 Apr 2006 01:18:14 -0000       1.31
+++ sys/arch/algor/algor/machdep.c      22 Apr 2006 17:05:43 -0000
@@ -721,7 +721,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (boothowto & RB_HALT) {
               printf("\n");
Index: sys/arch/algor/dev/com_mainbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/algor/dev/com_mainbus.c,v
retrieving revision 1.7
diff -u -r1.7 com_mainbus.c
--- sys/arch/algor/dev/com_mainbus.c    2 Oct 2002 03:36:20 -0000       1.7
+++ sys/arch/algor/dev/com_mainbus.c    22 Apr 2006 17:05:43 -0000
@@ -73,7 +73,7 @@

int    com_mainbus_match(struct device *, struct cfdata *, void *);
void   com_mainbus_attach(struct device *, struct device *, void *);
-void   com_mainbus_cleanup(void *);
+void   com_mainbus_cleanup(int howto, void *);

CFATTACH_DECL(com_mainbus, sizeof(struct com_mainbus_softc),
    com_mainbus_match, com_mainbus_attach, NULL, NULL);
@@ -127,7 +127,7 @@
}

void
-com_mainbus_cleanup(void *arg)
+com_mainbus_cleanup(int howto, void *arg)
{
       struct com_softc *sc = arg;

Index: sys/arch/alpha/a12/if_ade.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/a12/if_ade.c,v
retrieving revision 1.26
diff -u -r1.26 if_ade.c
--- sys/arch/alpha/a12/if_ade.c 26 Mar 2006 04:33:34 -0000      1.26
+++ sys/arch/alpha/a12/if_ade.c 22 Apr 2006 17:05:52 -0000
@@ -4959,7 +4959,7 @@

#if defined(__NetBSD__)
#define        TULIP_PCI_ATTACH_ARGS   struct device * const parent, struct device * const self, void * const aux
-#define        TULIP_SHUTDOWN_ARGS     void *arg
+#define        TULIP_SHUTDOWN_ARGS     int howto, void *arg
static int
tulip_pci_probe(
    struct device *parent,
Index: sys/arch/alpha/alpha/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/alpha/machdep.c,v
retrieving revision 1.288
diff -u -r1.288 machdep.c
--- sys/arch/alpha/alpha/machdep.c      11 Dec 2005 12:16:10 -0000      1.288
+++ sys/arch/alpha/alpha/machdep.c      22 Apr 2006 17:05:53 -0000
@@ -1049,7 +1049,7 @@
haltsys:

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#ifdef BOOTKEY
       printf("hit any key to %s...\n", howto & RB_HALT ? "halt" : "reboot");
Index: sys/arch/alpha/jensenio/com_jensenio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/jensenio/com_jensenio.c,v
retrieving revision 1.5
diff -u -r1.5 com_jensenio.c
--- sys/arch/alpha/jensenio/com_jensenio.c      2 Oct 2002 04:06:38 -0000       1.5
+++ sys/arch/alpha/jensenio/com_jensenio.c      22 Apr 2006 17:05:54 -0000
@@ -77,7 +77,7 @@

int    com_jensenio_match(struct device *, struct cfdata *, void *);
void   com_jensenio_attach(struct device *, struct device *, void *);
-void   com_jensenio_cleanup(void *);
+void   com_jensenio_cleanup(int, void *);

CFATTACH_DECL(com_jensenio, sizeof(struct com_jensenio_softc),
    com_jensenio_match, com_jensenio_attach, NULL, NULL);
@@ -143,7 +143,7 @@
}

void
-com_jensenio_cleanup(void *arg)
+com_jensenio_cleanup(int howto, void *arg)
{
       struct com_softc *sc = arg;

Index: sys/arch/alpha/pci/sio_pic.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/pci/sio_pic.c,v
retrieving revision 1.34
diff -u -r1.34 sio_pic.c
--- sys/arch/alpha/pci/sio_pic.c        11 Dec 2005 12:16:17 -0000      1.34
+++ sys/arch/alpha/pci/sio_pic.c        22 Apr 2006 17:05:57 -0000
@@ -131,7 +131,7 @@
void           (*sio_write_elcr) __P((int, u_int8_t));
static void    specific_eoi __P((int));
#ifdef BROKEN_PROM_CONSOLE
-void           sio_intr_shutdown __P((void *));
+void           sio_intr_shutdown __P((int, void *));
#endif

/******************** i82378 SIO ELCR functions ********************/
@@ -416,7 +416,8 @@

#ifdef BROKEN_PROM_CONSOLE
void
-sio_intr_shutdown(arg)
+sio_intr_shutdown(int, arg)
+       int howto;
       void *arg;
{
       /*
Index: sys/arch/alpha/sableio/com_sableio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/sableio/com_sableio.c,v
retrieving revision 1.4
diff -u -r1.4 com_sableio.c
--- sys/arch/alpha/sableio/com_sableio.c        2 Oct 2002 04:06:39 -0000       1.4
+++ sys/arch/alpha/sableio/com_sableio.c        22 Apr 2006 17:05:57 -0000
@@ -75,7 +75,7 @@

int    com_sableio_match(struct device *, struct cfdata *, void *);
void   com_sableio_attach(struct device *, struct device *, void *);
-void   com_sableio_cleanup(void *);
+void   com_sableio_cleanup(int, void *);

CFATTACH_DECL(com_sableio, sizeof(struct com_sableio_softc),
    com_sableio_match, com_sableio_attach, NULL, NULL);
@@ -136,7 +136,7 @@
}

void
-com_sableio_cleanup(void *arg)
+com_sableio_cleanup(int howto, void *arg)
{
       struct com_softc *sc = arg;

Index: sys/arch/amd64/amd64/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.38
diff -u -r1.38 machdep.c
--- sys/arch/amd64/amd64/machdep.c      21 Jan 2006 09:54:53 -0000      1.38
+++ sys/arch/amd64/amd64/machdep.c      22 Apr 2006 17:05:59 -0000
@@ -576,7 +576,7 @@
               dumpsys();

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

#ifdef MULTIPROCESSOR
       x86_broadcast_ipi(X86_IPI_HALT);
Index: sys/arch/amiga/dev/com_supio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amiga/dev/com_supio.c,v
retrieving revision 1.20
diff -u -r1.20 com_supio.c
--- sys/arch/amiga/dev/com_supio.c      11 Dec 2005 12:16:28 -0000      1.20
+++ sys/arch/amiga/dev/com_supio.c      22 Apr 2006 17:06:00 -0000
@@ -101,7 +101,7 @@

int com_supio_match(struct device *, struct cfdata *, void *);
void com_supio_attach(struct device *, struct device *, void *);
-void com_supio_cleanup(void *);
+void com_supio_cleanup(int, void *);

#if 0
static int      comconsaddr;
@@ -178,7 +178,7 @@
}

void
-com_supio_cleanup(void *arg)
+com_supio_cleanup(int howto, void *arg)
{
       struct com_softc *sc = arg;

Index: sys/arch/amiga/dev/ioblix_zbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amiga/dev/ioblix_zbus.c,v
retrieving revision 1.13
diff -u -r1.13 ioblix_zbus.c
--- sys/arch/amiga/dev/ioblix_zbus.c    11 Dec 2005 12:16:28 -0000      1.13
+++ sys/arch/amiga/dev/ioblix_zbus.c    22 Apr 2006 17:06:00 -0000
@@ -68,7 +68,7 @@
int iobzmatch(struct device *, struct cfdata *, void *);
void iobzattach(struct device *, struct device *, void *);
int iobzprint(void *auxp, const char *);
-void iobz_shutdown(void *);
+void iobz_shutdown(int, void *);

CFATTACH_DECL(iobl_zbus, sizeof(struct iobz_softc),
    iobzmatch, iobzattach, NULL, NULL);
@@ -167,7 +167,7 @@
 */

void
-iobz_shutdown(void *p) {
+iobz_shutdown(int howto, void *p) {
       volatile int8_t *q;

       q = p;
Index: sys/arch/arc/arc/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arc/arc/machdep.c,v
retrieving revision 1.95
diff -u -r1.95 machdep.c
--- sys/arch/arc/arc/machdep.c  9 Apr 2006 01:18:14 -0000       1.95
+++ sys/arch/arc/arc/machdep.c  22 Apr 2006 17:06:01 -0000
@@ -607,7 +607,7 @@
       if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP)
               dumpsys();

-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/arc/jazz/fd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arc/jazz/fd.c,v
retrieving revision 1.27
diff -u -r1.27 fd.c
--- sys/arch/arc/jazz/fd.c      15 Apr 2006 08:49:47 -0000      1.27
+++ sys/arch/arc/jazz/fd.c      22 Apr 2006 17:06:04 -0000
@@ -215,6 +215,7 @@
const struct fd_type *fd_nvtotype(char *, int, int);
#endif
void fd_set_motor(struct fdc_softc *, int);
+void fd_motor_shutdown(int, void *);
void fd_motor_off(void *);
void fd_motor_on(void *);
int fdcresult(struct fdc_softc *);
@@ -363,7 +364,7 @@
       mountroothook_establish(fd_mountroot_hook, &fd->sc_dev);

       /* Needed to power off if the motor is on when we halt. */
-       fd->sc_sdhook = shutdownhook_establish(fd_motor_off, fd);
+       fd->sc_sdhook = shutdownhook_establish(fd_motor_shutdown, fd);
}

#if 0
@@ -561,6 +562,12 @@
}

void
+fd_motor_shutdown(int why, void *arg)
+{
+       fd_motor_off(arg);
+}
+
+void
fd_motor_off(void *arg)
{
       struct fd_softc *fd = arg;
Index: sys/arch/atari/atari/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/atari/atari/machdep.c,v
retrieving revision 1.139
diff -u -r1.139 machdep.c
--- sys/arch/atari/atari/machdep.c      24 Dec 2005 22:45:34 -0000      1.139
+++ sys/arch/atari/atari/machdep.c      22 Apr 2006 17:06:06 -0000
@@ -441,7 +441,7 @@
        * Call shutdown hooks. Do this _before_ anything might be
        * asked to the user in case nobody is there....
        */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       splhigh();                      /* extreme priority */
       if(howto & RB_HALT) {
Index: sys/arch/atari/dev/hdfd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/atari/dev/hdfd.c,v
retrieving revision 1.50
diff -u -r1.50 hdfd.c
--- sys/arch/atari/dev/hdfd.c   14 Apr 2006 13:09:05 -0000      1.50
+++ sys/arch/atari/dev/hdfd.c   22 Apr 2006 17:06:08 -0000
@@ -301,6 +301,7 @@
struct dkdriver fddkdriver = { fdstrategy };

void   fd_set_motor __P((struct fdc_softc *fdc, int reset));
+void   fd_motor_shutdown __P((int howto, void *arg));
void   fd_motor_off __P((void *arg));
void   fd_motor_on __P((void *arg));
int    fdcresult __P((struct fdc_softc *fdc));
@@ -551,7 +552,7 @@
       disk_attach(&fd->sc_dk);

       /* Needed to power off if the motor is on when we halt. */
-       fd->sc_sdhook = shutdownhook_establish(fd_motor_off, fd);
+       fd->sc_sdhook = shutdownhook_establish(fd_motor_shutdown, fd);
}

/*
@@ -761,6 +762,14 @@
}

void
+fd_motor_shutdown(howto, arg)
+       int howto;
+       void *arg;
+{
+       fd_motor_off(arg);
+}
+
+void
fd_motor_off(arg)
       void *arg;
{
Index: sys/arch/bebox/bebox/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/bebox/bebox/machdep.c,v
retrieving revision 1.88
diff -u -r1.88 machdep.c
--- sys/arch/bebox/bebox/machdep.c      24 Dec 2005 20:06:58 -0000      1.88
+++ sys/arch/bebox/bebox/machdep.c      22 Apr 2006 17:06:09 -0000
@@ -412,7 +412,7 @@
       }
       splhigh();
       if (howto & RB_HALT) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("halted\n\n");
#if 0
               ppc_exit();
@@ -420,7 +420,7 @@
       }
       if (!cold && (howto & RB_DUMP))
               oea_dumpsys();
-       doshutdownhooks();
+       doshutdownhooks(howto);
       printf("rebooting\n\n");
       if (what && *what) {
               if (strlen(what) > sizeof str - 5)
Index: sys/arch/cats/cats/cats_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/cats/cats/cats_machdep.c,v
retrieving revision 1.56
diff -u -r1.56 cats_machdep.c
--- sys/arch/cats/cats/cats_machdep.c   11 Dec 2005 12:17:04 -0000      1.56
+++ sys/arch/cats/cats/cats_machdep.c   22 Apr 2006 17:06:10 -0000
@@ -237,7 +237,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -266,7 +266,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/cesfic/cesfic/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/cesfic/cesfic/machdep.c,v
retrieving revision 1.32
diff -u -r1.32 machdep.c
--- sys/arch/cesfic/cesfic/machdep.c    27 Dec 2005 07:25:57 -0000      1.32
+++ sys/arch/cesfic/cesfic/machdep.c    22 Apr 2006 17:06:11 -0000
@@ -448,7 +448,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#if defined(PANICWAIT) && !defined(DDB)
       if ((howto & RB_HALT) == 0 && panicstr) {
Index: sys/arch/cobalt/cobalt/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/cobalt/cobalt/machdep.c,v
retrieving revision 1.60
diff -u -r1.60 machdep.c
--- sys/arch/cobalt/cobalt/machdep.c    15 Apr 2006 11:28:52 -0000      1.60
+++ sys/arch/cobalt/cobalt/machdep.c    22 Apr 2006 17:06:14 -0000
@@ -349,7 +349,7 @@
               dumpsys();

 haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/dreamcast/dreamcast/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/dreamcast/dreamcast/machdep.c,v
retrieving revision 1.32
diff -u -r1.32 machdep.c
--- sys/arch/dreamcast/dreamcast/machdep.c      24 Dec 2005 23:24:00 -0000      1.32
+++ sys/arch/dreamcast/dreamcast/machdep.c      22 Apr 2006 17:06:15 -0000
@@ -247,7 +247,7 @@
               dumpsys();

 haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/evbarm/adi_brh/brh_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/adi_brh/brh_machdep.c,v
retrieving revision 1.23
diff -u -r1.23 brh_machdep.c
--- sys/arch/evbarm/adi_brh/brh_machdep.c       24 Dec 2005 20:06:59 -0000      1.23
+++ sys/arch/evbarm/adi_brh/brh_machdep.c       22 Apr 2006 17:06:16 -0000
@@ -243,7 +243,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -271,7 +271,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/armadillo/armadillo9_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/armadillo/armadillo9_machdep.c,v
retrieving revision 1.6
diff -u -r1.6 armadillo9_machdep.c
--- sys/arch/evbarm/armadillo/armadillo9_machdep.c      26 Feb 2006 05:24:52 -0000      1.6
+++ sys/arch/evbarm/armadillo/armadillo9_machdep.c      22 Apr 2006 17:06:17 -0000
@@ -343,7 +343,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("\r\n");
               printf("The operating system has halted.\r\n");
               printf("Please press any key to reboot.\r\n");
@@ -372,7 +372,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c,v
retrieving revision 1.7
diff -u -r1.7 g42xxeb_machdep.c
--- sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c   8 Mar 2006 23:46:23 -0000       1.7
+++ sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c   22 Apr 2006 17:06:18 -0000
@@ -283,7 +283,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -313,7 +313,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/hdl_g/hdlg_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/hdl_g/hdlg_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 hdlg_machdep.c
--- sys/arch/evbarm/hdl_g/hdlg_machdep.c        16 Apr 2006 02:22:33 -0000      1.1
+++ sys/arch/evbarm/hdl_g/hdlg_machdep.c        22 Apr 2006 17:06:19 -0000
@@ -729,7 +729,7 @@

haltsys:
       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/integrator/integrator_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/integrator/integrator_machdep.c,v
retrieving revision 1.55
diff -u -r1.55 integrator_machdep.c
--- sys/arch/evbarm/integrator/integrator_machdep.c     24 Dec 2005 22:45:34 -0000      1.55
+++ sys/arch/evbarm/integrator/integrator_machdep.c     22 Apr 2006 17:06:23 -0000
@@ -273,7 +273,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -302,7 +302,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/iq80310/iq80310_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/iq80310/iq80310_machdep.c,v
retrieving revision 1.66
diff -u -r1.66 iq80310_machdep.c
--- sys/arch/evbarm/iq80310/iq80310_machdep.c   11 Dec 2005 12:17:09 -0000      1.66
+++ sys/arch/evbarm/iq80310/iq80310_machdep.c   22 Apr 2006 17:06:24 -0000
@@ -243,7 +243,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -272,7 +272,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/iq80321/iq80321_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/iq80321/iq80321_machdep.c,v
retrieving revision 1.35
diff -u -r1.35 iq80321_machdep.c
--- sys/arch/evbarm/iq80321/iq80321_machdep.c   24 Dec 2005 20:06:59 -0000      1.35
+++ sys/arch/evbarm/iq80321/iq80321_machdep.c   22 Apr 2006 17:06:25 -0000
@@ -269,7 +269,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -297,7 +297,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/ixdp425/ixdp425_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/ixdp425/ixdp425_machdep.c,v
retrieving revision 1.14
diff -u -r1.14 ixdp425_machdep.c
--- sys/arch/evbarm/ixdp425/ixdp425_machdep.c   11 Dec 2005 12:17:09 -0000      1.14
+++ sys/arch/evbarm/ixdp425/ixdp425_machdep.c   22 Apr 2006 17:06:26 -0000
@@ -261,7 +261,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -289,7 +289,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/ixm1200/ixm1200_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c,v
retrieving revision 1.31
diff -u -r1.31 ixm1200_machdep.c
--- sys/arch/evbarm/ixm1200/ixm1200_machdep.c   11 Dec 2005 12:17:09 -0000      1.31
+++ sys/arch/evbarm/ixm1200/ixm1200_machdep.c   22 Apr 2006 17:06:27 -0000
@@ -246,7 +246,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("Halted while still in the ICE age.\n");
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
@@ -275,7 +275,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/lubbock/lubbock_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/lubbock/lubbock_machdep.c,v
retrieving revision 1.11
diff -u -r1.11 lubbock_machdep.c
--- sys/arch/evbarm/lubbock/lubbock_machdep.c   8 Mar 2006 23:46:23 -0000       1.11
+++ sys/arch/evbarm/lubbock/lubbock_machdep.c   22 Apr 2006 17:06:30 -0000
@@ -288,7 +288,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -318,7 +318,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c,v
retrieving revision 1.2
diff -u -r1.2 npwr_fc_machdep.c
--- sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c   24 Dec 2005 20:07:03 -0000      1.2
+++ sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c   22 Apr 2006 17:06:32 -0000
@@ -269,7 +269,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -297,7 +297,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/nslu2/nslu2_leds.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/nslu2/nslu2_leds.c,v
retrieving revision 1.2
diff -u -r1.2 nslu2_leds.c
--- sys/arch/evbarm/nslu2/nslu2_leds.c  15 Apr 2006 06:24:40 -0000      1.2
+++ sys/arch/evbarm/nslu2/nslu2_leds.c  22 Apr 2006 17:06:32 -0000
@@ -140,7 +140,7 @@
}

static void
-slugled_shutdown(void *arg)
+slugled_shutdown(int howto, void *arg)
{
       struct slugled_softc *sc = arg;
       uint32_t reg;
Index: sys/arch/evbarm/nslu2/nslu2_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/nslu2/nslu2_machdep.c,v
retrieving revision 1.2
diff -u -r1.2 nslu2_machdep.c
--- sys/arch/evbarm/nslu2/nslu2_machdep.c       11 Mar 2006 09:09:41 -0000      1.2
+++ sys/arch/evbarm/nslu2/nslu2_machdep.c       22 Apr 2006 17:06:33 -0000
@@ -297,7 +297,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -324,7 +324,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c,v
retrieving revision 1.15
diff -u -r1.15 smdk2410_machdep.c
--- sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c 24 Dec 2005 22:45:34 -0000      1.15
+++ sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c 22 Apr 2006 17:06:38 -0000
@@ -303,7 +303,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -331,7 +331,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c,v
retrieving revision 1.23
diff -u -r1.23 smdk2800_machdep.c
--- sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c 24 Dec 2005 22:45:34 -0000      1.23
+++ sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c 22 Apr 2006 17:06:39 -0000
@@ -297,7 +297,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -325,7 +325,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/tsarm/tsarm_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/tsarm/tsarm_machdep.c,v
retrieving revision 1.3
diff -u -r1.3 tsarm_machdep.c
--- sys/arch/evbarm/tsarm/tsarm_machdep.c       24 Dec 2005 22:45:34 -0000      1.3
+++ sys/arch/evbarm/tsarm/tsarm_machdep.c       22 Apr 2006 17:06:40 -0000
@@ -262,7 +262,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("\r\n");
               printf("The operating system has halted.\r\n");
               printf("Please press any key to reboot.\r\n");
@@ -291,7 +291,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbarm/viper/viper_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/viper/viper_machdep.c,v
retrieving revision 1.3
diff -u -r1.3 viper_machdep.c
--- sys/arch/evbarm/viper/viper_machdep.c       8 Mar 2006 23:46:23 -0000       1.3
+++ sys/arch/evbarm/viper/viper_machdep.c       22 Apr 2006 17:06:42 -0000
@@ -287,7 +287,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -317,7 +317,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/evbmips/alchemy/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbmips/alchemy/machdep.c,v
retrieving revision 1.28
diff -u -r1.28 machdep.c
--- sys/arch/evbmips/alchemy/machdep.c  9 Apr 2006 01:18:14 -0000       1.28
+++ sys/arch/evbmips/alchemy/machdep.c  22 Apr 2006 17:06:42 -0000
@@ -488,7 +488,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((boothowto & RB_POWERDOWN) == RB_POWERDOWN)
               if (board && board->ab_poweroff)
Index: sys/arch/evbmips/atheros/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbmips/atheros/machdep.c,v
retrieving revision 1.2
diff -u -r1.2 machdep.c
--- sys/arch/evbmips/atheros/machdep.c  9 Apr 2006 01:18:14 -0000       1.2
+++ sys/arch/evbmips/atheros/machdep.c  22 Apr 2006 17:06:42 -0000
@@ -474,7 +474,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#if 0
       if ((boothowto & RB_POWERDOWN) == RB_POWERDOWN)
Index: sys/arch/evbmips/malta/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbmips/malta/machdep.c,v
retrieving revision 1.22
diff -u -r1.22 machdep.c
--- sys/arch/evbmips/malta/machdep.c    24 Dec 2005 20:07:03 -0000      1.22
+++ sys/arch/evbmips/malta/machdep.c    22 Apr 2006 17:06:43 -0000
@@ -433,7 +433,7 @@
               dumpsys();

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/evbmips/malta/pci/pcib.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbmips/malta/pci/pcib.c,v
retrieving revision 1.11
diff -u -r1.11 pcib.c
--- sys/arch/evbmips/malta/pci/pcib.c   11 Dec 2005 12:17:11 -0000      1.11
+++ sys/arch/evbmips/malta/pci/pcib.c   22 Apr 2006 17:06:45 -0000
@@ -121,7 +121,7 @@
static int     pcib_intr(void *v);
static void    pcib_bridge_callback(struct device *);
static void    pcib_set_icus(struct pcib_softc *sc);
-static void    pcib_cleanup(void *arg);
+static void    pcib_cleanup(int howto, void *arg);

static const struct evcnt *
               pcib_isa_intr_evcnt(void *, int);
@@ -584,7 +584,7 @@
}

static void
-pcib_cleanup(void *arg)
+pcib_cleanup(int howto, void *arg)
{

       my_sc->sc_imask = 0xffff;
Index: sys/arch/evbppc/ev64260/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/ev64260/machdep.c,v
retrieving revision 1.19
diff -u -r1.19 machdep.c
--- sys/arch/evbppc/ev64260/machdep.c   24 Dec 2005 20:07:03 -0000      1.19
+++ sys/arch/evbppc/ev64260/machdep.c   22 Apr 2006 17:06:46 -0000
@@ -382,14 +382,14 @@
       }
       splhigh();
       if (howto & RB_HALT) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("halted\n\n");
               cnhalt();
               while(1);
       }
       if (!cold && (howto & RB_DUMP))
               oea_dumpsys();
-       doshutdownhooks();
+       doshutdownhooks(howto);
       printf("rebooting\n\n");
       if (what && *what) {
               if (strlen(what) > sizeof str - 5)
Index: sys/arch/evbppc/explora/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/explora/machdep.c,v
retrieving revision 1.10
diff -u -r1.10 machdep.c
--- sys/arch/evbppc/explora/machdep.c   31 Dec 2005 14:09:02 -0000      1.10
+++ sys/arch/evbppc/explora/machdep.c   22 Apr 2006 17:06:47 -0000
@@ -440,7 +440,7 @@
       if (!cold && (howto & RB_DUMP))
               /*XXX dumpsys()*/;

-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("halted\n\n");
Index: sys/arch/evbppc/obs405/obs200_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/obs405/obs200_machdep.c,v
retrieving revision 1.3
diff -u -r1.3 obs200_machdep.c
--- sys/arch/evbppc/obs405/obs200_machdep.c     29 Mar 2006 17:50:33 -0000      1.3
+++ sys/arch/evbppc/obs405/obs200_machdep.c     22 Apr 2006 17:06:47 -0000
@@ -235,7 +235,7 @@
       if (!cold && (howto & RB_DUMP))
               ibm4xx_dumpsys();

-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
         /* Power off here if we know how...*/
Index: sys/arch/evbppc/obs405/obs266_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/obs405/obs266_machdep.c,v
retrieving revision 1.4
diff -u -r1.4 obs266_machdep.c
--- sys/arch/evbppc/obs405/obs266_machdep.c     29 Mar 2006 17:50:33 -0000      1.4
+++ sys/arch/evbppc/obs405/obs266_machdep.c     22 Apr 2006 17:06:48 -0000
@@ -229,7 +229,7 @@
       if (!cold && (howto & RB_DUMP))
               ibm4xx_dumpsys();

-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
         /* Power off here if we know how...*/
Index: sys/arch/evbppc/walnut/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/walnut/machdep.c,v
retrieving revision 1.26
diff -u -r1.26 machdep.c
--- sys/arch/evbppc/walnut/machdep.c    26 Feb 2006 05:49:05 -0000      1.26
+++ sys/arch/evbppc/walnut/machdep.c    22 Apr 2006 17:06:48 -0000
@@ -497,7 +497,7 @@
       if (!cold && (howto & RB_DUMP))
               dumpsys();

-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
         /* Power off here if we know how...*/
Index: sys/arch/evbsh3/evbsh3/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbsh3/evbsh3/machdep.c,v
retrieving revision 1.57
diff -u -r1.57 machdep.c
--- sys/arch/evbsh3/evbsh3/machdep.c    17 Mar 2006 16:06:51 -0000      1.57
+++ sys/arch/evbsh3/evbsh3/machdep.c    22 Apr 2006 17:06:49 -0000
@@ -204,7 +204,7 @@
               dumpsys();

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/ews4800mips/ews4800mips/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/ews4800mips/ews4800mips/machdep.c,v
retrieving revision 1.2
diff -u -r1.2 machdep.c
--- sys/arch/ews4800mips/ews4800mips/machdep.c  25 Feb 2006 02:28:56 -0000      1.2
+++ sys/arch/ews4800mips/ews4800mips/machdep.c  22 Apr 2006 17:06:50 -0000
@@ -293,7 +293,7 @@
               dumpsys();

 haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
               if (platform.poweroff) {
Index: sys/arch/hp300/hp300/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hp300/hp300/machdep.c,v
retrieving revision 1.186
diff -u -r1.186 machdep.c
--- sys/arch/hp300/hp300/machdep.c      26 Mar 2006 01:49:09 -0000      1.186
+++ sys/arch/hp300/hp300/machdep.c      22 Apr 2006 17:06:51 -0000
@@ -673,7 +673,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#if defined(PANICWAIT) && !defined(DDB)
       if ((howto & RB_HALT) == 0 && panicstr) {
Index: sys/arch/hp700/hp700/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hp700/hp700/machdep.c,v
retrieving revision 1.29
diff -u -r1.29 machdep.c
--- sys/arch/hp700/hp700/machdep.c      24 Dec 2005 20:07:04 -0000      1.29
+++ sys/arch/hp700/hp700/machdep.c      22 Apr 2006 17:06:56 -0000
@@ -1377,7 +1377,7 @@
               dumpsys();

       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#ifdef POWER_SWITCH
       if (pwr_sw_state == 0 &&
Index: sys/arch/hpcarm/hpcarm/hpc_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcarm/hpcarm/hpc_machdep.c,v
retrieving revision 1.79
diff -u -r1.79 hpc_machdep.c
--- sys/arch/hpcarm/hpcarm/hpc_machdep.c        11 Apr 2006 15:08:10 -0000      1.79
+++ sys/arch/hpcarm/hpcarm/hpc_machdep.c        22 Apr 2006 17:06:58 -0000
@@ -228,7 +228,7 @@
        * and crash to earth fast.
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("Halted while still in the ICE age.\n");
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
@@ -260,7 +260,7 @@


       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQs are disabled */
       IRQdisable;
Index: sys/arch/hpcmips/hpcmips/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcmips/hpcmips/machdep.c,v
retrieving revision 1.90
diff -u -r1.90 machdep.c
--- sys/arch/hpcmips/hpcmips/machdep.c  9 Apr 2006 01:18:14 -0000       1.90
+++ sys/arch/hpcmips/hpcmips/machdep.c  22 Apr 2006 17:06:58 -0000
@@ -656,7 +656,7 @@
 haltsys:

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Finally, halt/reboot the system. */
       if (howto & RB_HALT) {
Index: sys/arch/hpcsh/hpcsh/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcsh/hpcsh/machdep.c,v
retrieving revision 1.53
diff -u -r1.53 machdep.c
--- sys/arch/hpcsh/hpcsh/machdep.c      9 Apr 2006 01:18:14 -0000       1.53
+++ sys/arch/hpcsh/hpcsh/machdep.c      22 Apr 2006 17:06:59 -0000
@@ -400,7 +400,7 @@

 haltsys:
       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Finally, halt/reboot the system. */
       if (howto & RB_HALT) {
Index: sys/arch/i386/i386/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.572
diff -u -r1.572 machdep.c
--- sys/arch/i386/i386/machdep.c        14 Apr 2006 09:50:16 -0000      1.572
+++ sys/arch/i386/i386/machdep.c        22 Apr 2006 17:07:05 -0000
@@ -863,7 +863,7 @@
               dumpsys();

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

#ifdef MULTIPROCESSOR
       x86_broadcast_ipi(X86_IPI_HALT);
Index: sys/arch/ibmnws/ibmnws/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/ibmnws/ibmnws/machdep.c,v
retrieving revision 1.5
diff -u -r1.5 machdep.c
--- sys/arch/ibmnws/ibmnws/machdep.c    24 Dec 2005 23:24:00 -0000      1.5
+++ sys/arch/ibmnws/ibmnws/machdep.c    22 Apr 2006 17:07:07 -0000
@@ -294,7 +294,7 @@
               oea_dumpsys();

halt_sys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
                printf("\n");
Index: sys/arch/iyonix/iyonix/iyonix_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/iyonix/iyonix/iyonix_machdep.c,v
retrieving revision 1.5
diff -u -r1.5 iyonix_machdep.c
--- sys/arch/iyonix/iyonix/iyonix_machdep.c     22 Feb 2006 00:23:52 -0000      1.5
+++ sys/arch/iyonix/iyonix/iyonix_machdep.c     22 Apr 2006 17:07:09 -0000
@@ -274,7 +274,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -302,7 +302,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/luna68k/luna68k/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/luna68k/luna68k/machdep.c,v
retrieving revision 1.44
diff -u -r1.44 machdep.c
--- sys/arch/luna68k/luna68k/machdep.c  24 Dec 2005 22:45:35 -0000      1.44
+++ sys/arch/luna68k/luna68k/machdep.c  22 Apr 2006 17:07:11 -0000
@@ -418,7 +418,7 @@

haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Finally, halt/reboot the system. */
       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
Index: sys/arch/mac68k/mac68k/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/mac68k/machdep.c,v
retrieving revision 1.308
diff -u -r1.308 machdep.c
--- sys/arch/mac68k/mac68k/machdep.c    24 Dec 2005 20:07:15 -0000      1.308
+++ sys/arch/mac68k/mac68k/machdep.c    22 Apr 2006 17:07:14 -0000
@@ -576,7 +576,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
               /* First try to power down under VIA control. */
Index: sys/arch/macppc/dev/esp.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/dev/esp.c,v
retrieving revision 1.20
diff -u -r1.20 esp.c
--- sys/arch/macppc/dev/esp.c   8 Mar 2006 23:46:23 -0000       1.20
+++ sys/arch/macppc/dev/esp.c   22 Apr 2006 17:07:15 -0000
@@ -146,7 +146,7 @@
};

static int espdmaintr __P((struct esp_softc *));
-static void esp_shutdownhook __P((void *));
+static void esp_shutdownhook __P((int, void *));

int
espmatch(parent, cf, aux)
@@ -526,7 +526,8 @@
}

void
-esp_shutdownhook(arg)
+esp_shutdownhook(howto, arg)
+       int howto;
       void *arg;
{
       struct ncr53c9x_softc *sc = arg;
Index: sys/arch/macppc/dev/if_wi_obio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/dev/if_wi_obio.c,v
retrieving revision 1.12
diff -u -r1.12 if_wi_obio.c
--- sys/arch/macppc/dev/if_wi_obio.c    11 Dec 2005 12:18:03 -0000      1.12
+++ sys/arch/macppc/dev/if_wi_obio.c    22 Apr 2006 17:07:15 -0000
@@ -58,7 +58,7 @@
int wi_obio_enable(struct wi_softc *);
void wi_obio_disable(struct wi_softc *);
void wi_obio_powerhook(int, void *);
-void wi_obio_shutdown(void *);
+void wi_obio_shutdown(int, void *);

struct wi_obio_softc {
       struct wi_softc sc_wi;
@@ -189,7 +189,8 @@
}

void
-wi_obio_shutdown(arg)
+wi_obio_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct wi_softc *sc = arg;
Index: sys/arch/macppc/dev/mesh.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/dev/mesh.c,v
retrieving revision 1.25
diff -u -r1.25 mesh.c
--- sys/arch/macppc/dev/mesh.c  29 Mar 2006 04:16:45 -0000      1.25
+++ sys/arch/macppc/dev/mesh.c  22 Apr 2006 17:07:19 -0000
@@ -138,7 +138,7 @@

int mesh_match __P((struct device *, struct cfdata *, void *));
void mesh_attach __P((struct device *, struct device *, void *));
-void mesh_shutdownhook __P((void *));
+void mesh_shutdownhook __P((int, void *));
int mesh_intr __P((void *));
void mesh_error __P((struct mesh_softc *, struct mesh_scb *, int, int));
void mesh_select __P((struct mesh_softc *, struct mesh_scb *));
@@ -296,7 +296,8 @@
}

void
-mesh_shutdownhook(arg)
+mesh_shutdownhook(howto, arg)
+       int howto;
       void *arg;
{
       struct mesh_softc *sc = arg;
Index: sys/arch/macppc/macppc/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/macppc/machdep.c,v
retrieving revision 1.136
diff -u -r1.136 machdep.c
--- sys/arch/macppc/macppc/machdep.c    11 Dec 2005 12:18:06 -0000      1.136
+++ sys/arch/macppc/macppc/machdep.c    22 Apr 2006 17:07:20 -0000
@@ -374,7 +374,7 @@
       if (!cold && (howto & RB_DUMP))
               dumpsys();

-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
#if NADB > 0
Index: sys/arch/mips/alchemy/dev/aurtc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/alchemy/dev/aurtc.c,v
retrieving revision 1.10
diff -u -r1.10 aurtc.c
--- sys/arch/mips/alchemy/dev/aurtc.c   28 Mar 2006 16:52:35 -0000      1.10
+++ sys/arch/mips/alchemy/dev/aurtc.c   22 Apr 2006 17:07:20 -0000
@@ -100,7 +100,7 @@
static int     aurtc_settime(todr_chip_handle_t, volatile struct timeval *);
static int     aurtc_getcal(todr_chip_handle_t, int *);
static int     aurtc_setcal(todr_chip_handle_t, int);
-static void    aurtc_shutdown(void *);
+static void    aurtc_shutdown(int, void *);

CFATTACH_DECL(aurtc, sizeof (struct aurtc_softc),
    aurtc_match, aurtc_attach, NULL, NULL);
@@ -192,7 +192,7 @@
}

void
-aurtc_shutdown(void *arg)
+aurtc_shutdown(int howto, void *arg)
{

       /* wait for the clock register to be idle */
Index: sys/arch/mips/alchemy/dev/if_aumac.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/alchemy/dev/if_aumac.c,v
retrieving revision 1.16
diff -u -r1.16 if_aumac.c
--- sys/arch/mips/alchemy/dev/if_aumac.c        3 Mar 2006 05:35:26 -0000       1.16
+++ sys/arch/mips/alchemy/dev/if_aumac.c        22 Apr 2006 17:07:22 -0000
@@ -184,7 +184,7 @@
static int     aumac_init(struct ifnet *);
static void    aumac_stop(struct ifnet *, int);

-static void    aumac_shutdown(void *);
+static void    aumac_shutdown(int, void *);

static void    aumac_tick(void *);

@@ -378,7 +378,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-aumac_shutdown(void *arg)
+aumac_shutdown(int howto, void *arg)
{
       struct aumac_softc *sc = arg;

Index: sys/arch/mips/atheros/dev/if_ae.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/atheros/dev/if_ae.c,v
retrieving revision 1.1
diff -u -r1.1 if_ae.c
--- sys/arch/mips/atheros/dev/if_ae.c   21 Mar 2006 08:15:19 -0000      1.1
+++ sys/arch/mips/atheros/dev/if_ae.c   22 Apr 2006 17:07:23 -0000
@@ -173,7 +173,7 @@
static int     ae_init(struct ifnet *);
static void    ae_stop(struct ifnet *, int);

-static void    ae_shutdown(void *);
+static void    ae_shutdown(int, void *);

static void    ae_rxdrain(struct ae_softc *);
static int     ae_add_rxbuf(struct ae_softc *, int);
@@ -547,7 +547,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-ae_shutdown(void *arg)
+ae_shutdown(int howto, void *arg)
{
       struct ae_softc *sc = arg;

Index: sys/arch/mips/atheros/dev/if_ath_arbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/atheros/dev/if_ath_arbus.c,v
retrieving revision 1.3
diff -u -r1.3 if_ath_arbus.c
--- sys/arch/mips/atheros/dev/if_ath_arbus.c    7 Apr 2006 04:57:05 -0000       1.3
+++ sys/arch/mips/atheros/dev/if_ath_arbus.c    22 Apr 2006 17:07:23 -0000
@@ -77,7 +77,7 @@
static int     ath_arbus_match(struct device *, struct cfdata *, void *);
static void    ath_arbus_attach(struct device *, struct device *, void *);
static int     ath_arbus_detach(struct device *, int);
-static void    ath_arbus_shutdown(void *);
+static void    ath_arbus_shutdown(int, void *);

CFATTACH_DECL(ath_arbus, sizeof(struct ath_arbus_softc),
    ath_arbus_match, ath_arbus_attach, ath_arbus_detach, NULL);
@@ -171,7 +171,7 @@
}

static void
-ath_arbus_shutdown(void *opaque)
+ath_arbus_shutdown(int howto, void *opaque)
{
       struct ath_arbus_softc *asc = opaque;

Index: sys/arch/mipsco/mipsco/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mipsco/mipsco/machdep.c,v
retrieving revision 1.46
diff -u -r1.46 machdep.c
--- sys/arch/mipsco/mipsco/machdep.c    9 Apr 2006 01:18:14 -0000       1.46
+++ sys/arch/mipsco/mipsco/machdep.c    22 Apr 2006 17:07:26 -0000
@@ -539,7 +539,7 @@
haltsys:

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN)
               prom_halt(0x80);        /* rom monitor RB_PWOFF */
Index: sys/arch/mmeye/mmeye/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mmeye/mmeye/machdep.c,v
retrieving revision 1.38
diff -u -r1.38 machdep.c
--- sys/arch/mmeye/mmeye/machdep.c      24 Dec 2005 20:07:19 -0000      1.38
+++ sys/arch/mmeye/mmeye/machdep.c      22 Apr 2006 17:07:28 -0000
@@ -209,7 +209,7 @@
               dumpsys();

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/mvme68k/dev/clock_pcc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mvme68k/dev/clock_pcc.c,v
retrieving revision 1.16
diff -u -r1.16 clock_pcc.c
--- sys/arch/mvme68k/dev/clock_pcc.c    11 Dec 2005 12:18:17 -0000      1.16
+++ sys/arch/mvme68k/dev/clock_pcc.c    22 Apr 2006 17:07:28 -0000
@@ -76,7 +76,7 @@
static int clock_pcc_statintr __P((void *));
static void clock_pcc_initclocks __P((void *, int, int));
static long clock_pcc_microtime __P((void *));
-static void clock_pcc_shutdown __P((void *));
+static void clock_pcc_shutdown __P((int, void *));

static struct clock_pcc_softc *clock_pcc_sc;

@@ -237,7 +237,8 @@

/* ARGSUSED */
void
-clock_pcc_shutdown(arg)
+clock_pcc_shutdown(howto, arg)
+       int howto;
       void *arg;
{

Index: sys/arch/mvme68k/mvme68k/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mvme68k/mvme68k/machdep.c,v
retrieving revision 1.114
diff -u -r1.114 machdep.c
--- sys/arch/mvme68k/mvme68k/machdep.c  11 Dec 2005 12:18:17 -0000      1.114
+++ sys/arch/mvme68k/mvme68k/machdep.c  22 Apr 2006 17:07:29 -0000
@@ -764,7 +764,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#if defined(PANICWAIT) && !defined(DDB)
       if ((howto & RB_HALT) == 0 && panicstr) {
Index: sys/arch/mvmeppc/mvmeppc/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mvmeppc/mvmeppc/machdep.c,v
retrieving revision 1.21
diff -u -r1.21 machdep.c
--- sys/arch/mvmeppc/mvmeppc/machdep.c  24 Dec 2005 20:07:20 -0000      1.21
+++ sys/arch/mvmeppc/mvmeppc/machdep.c  22 Apr 2006 17:07:30 -0000
@@ -381,7 +381,7 @@
               oea_dumpsys();

halt_sys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
                printf("\n");
Index: sys/arch/netwinder/netwinder/netwinder_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/netwinder/netwinder/netwinder_machdep.c,v
retrieving revision 1.61
diff -u -r1.61 netwinder_machdep.c
--- sys/arch/netwinder/netwinder/netwinder_machdep.c    5 Apr 2006 00:37:11 -0000       1.61
+++ sys/arch/netwinder/netwinder/netwinder_machdep.c    22 Apr 2006 17:07:31 -0000
@@ -269,7 +269,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("The operating system has halted.\n");
               printf("Please press any key to reboot.\n\n");
               cngetc();
@@ -299,7 +299,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/news68k/news68k/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/news68k/news68k/machdep.c,v
retrieving revision 1.62
diff -u -r1.62 machdep.c
--- sys/arch/news68k/news68k/machdep.c  11 Dec 2005 12:18:23 -0000      1.62
+++ sys/arch/news68k/news68k/machdep.c  22 Apr 2006 17:07:32 -0000
@@ -409,7 +409,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#if defined(PANICWAIT) && !defined(DDB)
       if ((howto & RB_HALT) == 0 && panicstr) {
Index: sys/arch/newsmips/newsmips/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/newsmips/machdep.c,v
retrieving revision 1.83
diff -u -r1.83 machdep.c
--- sys/arch/newsmips/newsmips/machdep.c        9 Apr 2006 01:18:14 -0000       1.83
+++ sys/arch/newsmips/newsmips/machdep.c        22 Apr 2006 17:07:36 -0000
@@ -611,7 +611,7 @@
haltsys:

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN)
               prom_halt(0x80);        /* rom monitor RB_PWOFF */
Index: sys/arch/next68k/dev/mb8795.c
===================================================================
RCS file: /cvsroot/src/sys/arch/next68k/dev/mb8795.c,v
retrieving revision 1.38
diff -u -r1.38 mb8795.c
--- sys/arch/next68k/dev/mb8795.c       11 Dec 2005 12:18:25 -0000      1.38
+++ sys/arch/next68k/dev/mb8795.c       22 Apr 2006 17:07:37 -0000
@@ -117,7 +117,7 @@
 * and the Fujitsu Manchester Encoder/Decoder (MB502).
 */

-void mb8795_shutdown(void *);
+void mb8795_shutdown(int, void *);

bus_dmamap_t mb8795_txdma_restart(bus_dmamap_t, void *);
void mb8795_start_dma(struct mb8795_softc *);
@@ -586,7 +586,7 @@
}

void
-mb8795_shutdown(void *arg)
+mb8795_shutdown(int howto, void *arg)
{
       struct mb8795_softc *sc = (struct mb8795_softc *)arg;

Index: sys/arch/next68k/next68k/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/next68k/next68k/machdep.c,v
retrieving revision 1.74
diff -u -r1.74 machdep.c
--- sys/arch/next68k/next68k/machdep.c  11 Dec 2005 12:18:29 -0000      1.74
+++ sys/arch/next68k/next68k/machdep.c  22 Apr 2006 17:07:38 -0000
@@ -569,7 +569,7 @@

 haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#if defined(PANICWAIT) && !defined(DDB)
       if ((howto & RB_HALT) == 0 && panicstr) {
Index: sys/arch/ofppc/ofppc/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/ofppc/ofppc/machdep.c,v
retrieving revision 1.89
diff -u -r1.89 machdep.c
--- sys/arch/ofppc/ofppc/machdep.c      24 Dec 2005 22:45:36 -0000      1.89
+++ sys/arch/ofppc/ofppc/machdep.c      22 Apr 2006 17:07:38 -0000
@@ -291,13 +291,13 @@
       }
       splhigh();
       if (howto & RB_HALT) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("halted\n\n");
               ppc_exit();
       }
       if (!cold && (howto & RB_DUMP))
               oea_dumpsys();
-       doshutdownhooks();
+       doshutdownhooks(howto);
       printf("rebooting\n\n");
       if (what && *what) {
               if (strlen(what) > sizeof str - 5)
Index: sys/arch/pc532/dev/scn.c
===================================================================
RCS file: /cvsroot/src/sys/arch/pc532/dev/scn.c,v
retrieving revision 1.70
diff -u -r1.70 scn.c
--- sys/arch/pc532/dev/scn.c    29 Mar 2006 03:58:48 -0000      1.70
+++ sys/arch/pc532/dev/scn.c    22 Apr 2006 17:07:40 -0000
@@ -131,7 +131,7 @@
void    scncnputc __P((void *, int));
void   scncnpollc __P((dev_t, int));
int    scninit __P((dev_t, int));
-void   scncnreinit __P((void *));
+void   scncnreinit __P((int, void *));
int     scnhwiflow __P((struct tty *, int));

CFATTACH_DECL(scn, sizeof(struct scn_softc),
@@ -1961,7 +1961,8 @@
}

void
-scncnreinit(v)
+scncnreinit(howto, v)
+       int howto;
       void *v;
{
       volatile u_char *du_base = DUADDR();
Index: sys/arch/pc532/pc532/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/pc532/pc532/machdep.c,v
retrieving revision 1.163
diff -u -r1.163 machdep.c
--- sys/arch/pc532/pc532/machdep.c      24 Dec 2005 20:07:24 -0000      1.163
+++ sys/arch/pc532/pc532/machdep.c      22 Apr 2006 17:07:43 -0000
@@ -545,7 +545,7 @@
        * Call shutdown hooks. Do this _before_ anything might be
        * asked to the user in case nobody is there....
        */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/playstation2/playstation2/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/playstation2/playstation2/machdep.c,v
retrieving revision 1.16
diff -u -r1.16 machdep.c
--- sys/arch/playstation2/playstation2/machdep.c        9 Apr 2006 01:18:14 -0000       1.16
+++ sys/arch/playstation2/playstation2/machdep.c        22 Apr 2006 17:07:44 -0000
@@ -262,7 +262,7 @@
               dumpsys();

 haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if ((howto & RB_POWERDOWN) == RB_POWERDOWN)
               sifbios_halt(0); /* power down */
Index: sys/arch/pmax/pmax/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/pmax/pmax/machdep.c,v
retrieving revision 1.214
diff -u -r1.214 machdep.c
--- sys/arch/pmax/pmax/machdep.c        15 Apr 2006 17:51:34 -0000      1.214
+++ sys/arch/pmax/pmax/machdep.c        22 Apr 2006 17:07:46 -0000
@@ -555,7 +555,7 @@
haltsys:

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Finally, halt/reboot the system. */
       printf("%s\n\n", ((howto & RB_HALT) != 0) ? "halted." : "rebooting...");
Index: sys/arch/pmppc/pmppc/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/pmppc/pmppc/machdep.c,v
retrieving revision 1.21
diff -u -r1.21 machdep.c
--- sys/arch/pmppc/pmppc/machdep.c      24 Dec 2005 20:07:28 -0000      1.21
+++ sys/arch/pmppc/pmppc/machdep.c      22 Apr 2006 17:07:47 -0000
@@ -390,13 +390,13 @@
       }
       splhigh();
       if (howto & RB_HALT) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("halted\n\n");
               while(1);
       }
       if (!cold && (howto & RB_DUMP))
               oea_dumpsys();
-       doshutdownhooks();
+       doshutdownhooks(howto);
       printf("rebooting\n\n");
       if (what && *what) {
               if (strlen(what) > sizeof str - 5)
Index: sys/arch/powerpc/ibm4xx/dev/if_emac.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/ibm4xx/dev/if_emac.c,v
retrieving revision 1.25
diff -u -r1.25 if_emac.c
--- sys/arch/powerpc/ibm4xx/dev/if_emac.c       20 Feb 2006 16:50:36 -0000      1.25
+++ sys/arch/powerpc/ibm4xx/dev/if_emac.c       22 Apr 2006 17:07:48 -0000
@@ -256,7 +256,7 @@
static void    emac_reset(struct emac_softc *);
static void    emac_rxdrain(struct emac_softc *);
static int     emac_txreap(struct emac_softc *);
-static void    emac_shutdown(void *);
+static void    emac_shutdown(int, void *);
static void    emac_start(struct ifnet *);
static void    emac_stop(struct ifnet *, int);
static void    emac_watchdog(struct ifnet *);
@@ -520,7 +520,7 @@
 * Device shutdown routine.
 */
static void
-emac_shutdown(void *arg)
+emac_shutdown(int howto, void *arg)
{
       struct emac_softc *sc = arg;

Index: sys/arch/prep/prep/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/prep/prep/machdep.c,v
retrieving revision 1.58
diff -u -r1.58 machdep.c
--- sys/arch/prep/prep/machdep.c        16 Mar 2006 17:43:34 -0000      1.58
+++ sys/arch/prep/prep/machdep.c        22 Apr 2006 17:07:49 -0000
@@ -355,7 +355,7 @@
               oea_dumpsys();

halt_sys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
                printf("\n");
Index: sys/arch/sandpoint/sandpoint/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sandpoint/sandpoint/machdep.c,v
retrieving revision 1.33
diff -u -r1.33 machdep.c
--- sys/arch/sandpoint/sandpoint/machdep.c      24 Dec 2005 20:07:32 -0000      1.33
+++ sys/arch/sandpoint/sandpoint/machdep.c      22 Apr 2006 17:07:49 -0000
@@ -321,13 +321,13 @@
       }
       splhigh();
       if (howto & RB_HALT) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("halted\n\n");
               while(1);
       }
       if (!cold && (howto & RB_DUMP))
               oea_dumpsys();
-       doshutdownhooks();
+       doshutdownhooks(howto);
       printf("rebooting\n\n");
       if (what && *what) {
               if (strlen(what) > sizeof str - 5)
Index: sys/arch/sbmips/sbmips/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sbmips/sbmips/machdep.c,v
retrieving revision 1.29
diff -u -r1.29 machdep.c
--- sys/arch/sbmips/sbmips/machdep.c    9 Apr 2006 01:18:14 -0000       1.29
+++ sys/arch/sbmips/sbmips/machdep.c    22 Apr 2006 17:07:51 -0000
@@ -421,7 +421,7 @@
               dumpsys();

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/sgimips/mace/if_mec.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sgimips/mace/if_mec.c,v
retrieving revision 1.8
diff -u -r1.8 if_mec.c
--- sys/arch/sgimips/mace/if_mec.c      2 Apr 2006 11:20:46 -0000       1.8
+++ sys/arch/sgimips/mace/if_mec.c      22 Apr 2006 17:07:54 -0000
@@ -354,7 +354,7 @@
STATIC void    mec_stop(struct ifnet *, int);
STATIC void    mec_rxintr(struct mec_softc *);
STATIC void    mec_txintr(struct mec_softc *);
-STATIC void    mec_shutdown(void *);
+STATIC void    mec_shutdown(int, void *);

CFATTACH_DECL(mec, sizeof(struct mec_softc),
    mec_match, mec_attach, NULL, NULL);
@@ -1473,7 +1473,7 @@
}

STATIC void
-mec_shutdown(void *arg)
+mec_shutdown(int howto, void *arg)
{
       struct mec_softc *sc = arg;

Index: sys/arch/sgimips/sgimips/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sgimips/sgimips/machdep.c,v
retrieving revision 1.96
diff -u -r1.96 machdep.c
--- sys/arch/sgimips/sgimips/machdep.c  9 Apr 2006 01:18:14 -0000       1.96
+++ sys/arch/sgimips/sgimips/machdep.c  22 Apr 2006 17:07:55 -0000
@@ -698,7 +698,7 @@

haltsys:

-       doshutdownhooks();
+       doshutdownhooks(howto);

       /*
        * Calling ARCBIOS->PowerDown() results in a "CP1 unusable trap"
Index: sys/arch/sh5/sh5/sh5_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sh5/sh5/sh5_machdep.c,v
retrieving revision 1.8
diff -u -r1.8 sh5_machdep.c
--- sys/arch/sh5/sh5/sh5_machdep.c      11 Dec 2005 12:19:02 -0000      1.8
+++ sys/arch/sh5/sh5/sh5_machdep.c      22 Apr 2006 17:07:55 -0000
@@ -124,7 +124,7 @@
#endif

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
               printf("\n");
Index: sys/arch/shark/ofw/ofw.c
===================================================================
RCS file: /cvsroot/src/sys/arch/shark/ofw/ofw.c,v
retrieving revision 1.35
diff -u -r1.35 ofw.c
--- sys/arch/shark/ofw/ofw.c    8 Dec 2005 22:41:44 -0000       1.35
+++ sys/arch/shark/ofw/ofw.c    22 Apr 2006 17:07:58 -0000
@@ -344,7 +344,7 @@
        * and crash to earth fast
        */
       if (cold) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               printf("Halted while still in the ICE age.\n");
               printf("The operating system has halted.\n");
               goto ofw_exit;
@@ -368,7 +368,7 @@
               dumpsys();

       /* Run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* Make sure IRQ's are disabled */
       IRQdisable;
Index: sys/arch/sparc/dev/com_obio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/dev/com_obio.c,v
retrieving revision 1.18
diff -u -r1.18 com_obio.c
--- sys/arch/sparc/dev/com_obio.c       16 Nov 2005 00:49:03 -0000      1.18
+++ sys/arch/sparc/dev/com_obio.c       22 Apr 2006 17:07:59 -0000
@@ -105,7 +105,7 @@

static int com_obio_match(struct device *, struct cfdata *, void *);
static void com_obio_attach(struct device *, struct device *, void *);
-static void com_obio_cleanup(void *);
+static void com_obio_cleanup(int, void *);

CFATTACH_DECL(com_obio, sizeof(struct com_obio_softc),
    com_obio_match, com_obio_attach, NULL, NULL);
@@ -234,7 +234,7 @@
}

static void
-com_obio_cleanup(void *arg)
+com_obio_cleanup(int howto, void *arg)
{
       struct com_softc *sc = arg;

Index: sys/arch/sparc/dev/fd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/dev/fd.c,v
retrieving revision 1.126
diff -u -r1.126 fd.c
--- sys/arch/sparc/dev/fd.c     14 Apr 2006 13:09:05 -0000      1.126
+++ sys/arch/sparc/dev/fd.c     22 Apr 2006 17:08:02 -0000
@@ -331,6 +331,7 @@

struct fd_type *fd_nvtotype(char *, int, int);
void   fd_set_motor(struct fdc_softc *);
+void   fd_motor_shutdown(int, void *);
void   fd_motor_off(void *);
void   fd_motor_on(void *);
int    fdcresult(struct fdc_softc *);
@@ -799,7 +800,7 @@
       mountroothook_establish(fd_mountroot_hook, &fd->sc_dv);

       /* Make sure the drive motor gets turned off at shutdown time. */
-       fd->sc_sdhook = shutdownhook_establish(fd_motor_off, fd);
+       fd->sc_sdhook = shutdownhook_establish(fd_motor_shutdown, fd);
}

inline struct fd_type *
@@ -990,6 +991,12 @@
}

void
+fd_motor_shutdown(int howto, void *arg)
+{
+       fd_motor_off(arg);
+}
+
+void
fd_motor_off(void *arg)
{
       struct fd_softc *fd = arg;
Index: sys/arch/sparc/sparc/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/sparc/machdep.c,v
retrieving revision 1.263
diff -u -r1.263 machdep.c
--- sys/arch/sparc/sparc/machdep.c      11 Dec 2005 12:19:08 -0000      1.263
+++ sys/arch/sparc/sparc/machdep.c      22 Apr 2006 17:08:04 -0000
@@ -1093,7 +1093,7 @@
 haltsys:

       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* If powerdown was requested, do it. */
       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
Index: sys/arch/sparc64/dev/sab.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc64/dev/sab.c,v
retrieving revision 1.27
diff -u -r1.27 sab.c
--- sys/arch/sparc64/dev/sab.c  18 Apr 2006 00:09:37 -0000      1.27
+++ sys/arch/sparc64/dev/sab.c  22 Apr 2006 17:08:08 -0000
@@ -147,7 +147,7 @@
int sabtty_speed(int);
void sabtty_console_flags(struct sabtty_softc *);
void sabtty_cnpollc(struct sabtty_softc *, int);
-void sabtty_shutdown(void *);
+void sabtty_shutdown(int, void *);
int sabttyparam(struct sabtty_softc *, struct tty *, struct termios *);

void sabtty_cnputc(struct sabtty_softc *, int);
@@ -1284,7 +1284,7 @@
}

void
-sabtty_shutdown(void *vsc)
+sabtty_shutdown(int howto, void *vsc)
{
       struct sabtty_softc *sc = vsc;

Index: sys/arch/sparc64/sparc64/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc64/sparc64/machdep.c,v
retrieving revision 1.186
diff -u -r1.186 machdep.c
--- sys/arch/sparc64/sparc64/machdep.c  20 Feb 2006 19:00:27 -0000      1.186
+++ sys/arch/sparc64/sparc64/machdep.c  22 Apr 2006 17:08:10 -0000
@@ -645,7 +645,7 @@

haltsys:
       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       /* If powerdown was requested, do it. */
       if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
Index: sys/arch/sun2/sun2/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sun2/sun2/machdep.c,v
retrieving revision 1.41
diff -u -r1.41 machdep.c
--- sys/arch/sun2/sun2/machdep.c        24 Dec 2005 20:07:41 -0000      1.41
+++ sys/arch/sun2/sun2/machdep.c        22 Apr 2006 17:08:11 -0000
@@ -562,7 +562,7 @@
               dumpsys();

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
       haltsys:
Index: sys/arch/sun3/dev/fd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sun3/dev/fd.c,v
retrieving revision 1.48
diff -u -r1.48 fd.c
--- sys/arch/sun3/dev/fd.c      19 Apr 2006 06:16:00 -0000      1.48
+++ sys/arch/sun3/dev/fd.c      22 Apr 2006 17:08:14 -0000
@@ -292,6 +292,7 @@

struct fd_type *fd_nvtotype(char *, int, int);
void   fd_set_motor(struct fdc_softc *);
+void   fd_motor_shutdown(int, void *);
void   fd_motor_off(void *);
void   fd_motor_on(void *);
int    fdcresult(struct fdc_softc *);
@@ -601,7 +602,7 @@
       mountroothook_establish(fd_mountroot_hook, &fd->sc_dv);

       /* Make sure the drive motor gets turned off at shutdown time. */
-       fd->sc_sdhook = shutdownhook_establish(fd_motor_off, fd);
+       fd->sc_sdhook = shutdownhook_establish(fd_motor_shutdown, fd);
}

inline struct fd_type *
@@ -767,6 +768,12 @@
       FCR_REG_SYNC();
}

+void
+fd_motor_shutdown(int howto, void *arg)
+{
+       fd_motor_off(arg);
+}
+
void
fd_motor_off(void *arg)
{
Index: sys/arch/sun3/sun3/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sun3/sun3/machdep.c,v
retrieving revision 1.176
diff -u -r1.176 machdep.c
--- sys/arch/sun3/sun3/machdep.c        11 Dec 2005 12:19:27 -0000      1.176
+++ sys/arch/sun3/sun3/machdep.c        22 Apr 2006 17:08:16 -0000
@@ -469,7 +469,7 @@
               dumpsys();

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
       haltsys:
Index: sys/arch/sun3/sun3x/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sun3/sun3x/machdep.c,v
retrieving revision 1.102
diff -u -r1.102 machdep.c
--- sys/arch/sun3/sun3x/machdep.c       11 Dec 2005 12:19:27 -0000      1.102
+++ sys/arch/sun3/sun3x/machdep.c       22 Apr 2006 17:08:17 -0000
@@ -496,7 +496,7 @@
               dumpsys();

       /* run any shutdown hooks */
-       doshutdownhooks();
+       doshutdownhooks(howto);

       if (howto & RB_HALT) {
       haltsys:
Index: sys/arch/vax/vax/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/vax/machdep.c,v
retrieving revision 1.152
diff -u -r1.152 machdep.c
--- sys/arch/vax/vax/machdep.c  24 Dec 2005 22:45:40 -0000      1.152
+++ sys/arch/vax/vax/machdep.c  22 Apr 2006 17:08:18 -0000
@@ -364,7 +364,7 @@
       }
       splhigh();              /* extreme priority */
       if (howto & RB_HALT) {
-               doshutdownhooks();
+               doshutdownhooks(howto);
               if (dep_call->cpu_halt)
                       (*dep_call->cpu_halt) ();
               printf("halting (in tight loop); hit\n\t^P\n\tHALT\n\n");
Index: sys/arch/x68k/dev/pow.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/dev/pow.c,v
retrieving revision 1.14
diff -u -r1.14 pow.c
--- sys/arch/x68k/dev/pow.c     11 Dec 2005 12:19:37 -0000      1.14
+++ sys/arch/x68k/dev/pow.c     22 Apr 2006 17:08:19 -0000
@@ -64,7 +64,7 @@
void powintr(void);
static int setalarm(struct x68k_alarminfo *);

-static void pow_check_switch(void *);
+static void pow_check_switch(int, void *);

dev_type_open(powopen);
dev_type_close(powclose);
@@ -302,7 +302,7 @@
}

static void
-pow_check_switch(void *dummy)
+pow_check_switch(int howto, void *dummy)
{
       extern int power_switch_is_off;

Index: sys/arch/x68k/x68k/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/x68k/machdep.c,v
retrieving revision 1.131
diff -u -r1.131 machdep.c
--- sys/arch/x68k/x68k/machdep.c        24 Dec 2005 22:45:40 -0000      1.131
+++ sys/arch/x68k/x68k/machdep.c        22 Apr 2006 17:08:20 -0000
@@ -501,7 +501,7 @@
               dumpsys();

       /* Run any shutdown hooks. */
-       doshutdownhooks();
+       doshutdownhooks(howto);

#if defined(PANICWAIT) && !defined(DDB)
       if ((howto & RB_HALT) == 0 && panicstr) {
Index: sys/arch/xen/i386/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/i386/machdep.c,v
retrieving revision 1.27
diff -u -r1.27 machdep.c
--- sys/arch/xen/i386/machdep.c 9 Apr 2006 19:28:01 -0000       1.27
+++ sys/arch/xen/i386/machdep.c 22 Apr 2006 17:08:26 -0000
@@ -823,7 +823,7 @@
               dumpsys();

haltsys:
-       doshutdownhooks();
+       doshutdownhooks(howto);

#ifdef MULTIPROCESSOR
       x86_broadcast_ipi(X86_IPI_HALT);