- Linus: more PageDirty / swapcache handling
[davej-history.git] / arch / mips64 / sgi-ip27 / ip27-reset.c
blob40eff73c161d07cd4f82493679498fcafb58879d
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
6 * Reset an IP27.
8 * Copyright (C) 1997, 1998, 1999, 2000 by Ralf Baechle
9 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
11 #include <linux/config.h>
12 #include <linux/kernel.h>
13 #include <linux/sched.h>
14 #include <linux/timer.h>
15 #include <linux/smp.h>
16 #include <linux/mmzone.h>
17 #include <asm/io.h>
18 #include <asm/irq.h>
19 #include <asm/system.h>
20 #include <asm/sgialib.h>
21 #include <asm/sn/addrs.h>
22 #include <asm/sn/arch.h>
23 #include <asm/sn/gda.h>
24 #include <asm/sn/sn0/hub.h>
26 void machine_restart(char *command) __attribute__((noreturn));
27 void machine_halt(void) __attribute__((noreturn));
28 void machine_power_off(void) __attribute__((noreturn));
30 #define noreturn while(1); /* Silence gcc. */
32 /* XXX How to pass the reboot command to the firmware??? */
33 void machine_restart(char *command)
35 #if 0
36 int i;
37 #endif
39 printk("Reboot started from CPU %d\n", smp_processor_id());
40 #ifdef CONFIG_SMP
41 smp_send_stop();
42 #endif
43 #if 0
44 for (i = 0; i < numnodes; i++)
45 REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
46 PROMOP_REBOOT);
47 #else
48 LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
49 #endif
50 noreturn;
53 void machine_halt(void)
55 int i;
57 #ifdef CONFIG_SMP
58 smp_send_stop();
59 #endif
60 for (i = 0; i < numnodes; i++)
61 REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
62 PROMOP_RESTART);
63 LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
64 noreturn;
67 void machine_power_off(void)
69 /* To do ... */
70 noreturn;
73 void ip27_reboot_setup(void)
75 /* Nothing to do on IP27. */