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
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>
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
)
39 printk("Reboot started from CPU %d\n", smp_processor_id());
44 for (i
= 0; i
< numnodes
; i
++)
45 REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i
), PROMOP_REG
,
48 LOCAL_HUB_S(NI_PORT_RESET
, NPR_PORTRESET
| NPR_LOCALRESET
);
53 void machine_halt(void)
60 for (i
= 0; i
< numnodes
; i
++)
61 REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i
), PROMOP_REG
,
63 LOCAL_HUB_S(NI_PORT_RESET
, NPR_PORTRESET
| NPR_LOCALRESET
);
67 void machine_power_off(void)
73 void ip27_reboot_setup(void)
75 /* Nothing to do on IP27. */