patch-2.4.0-test3 linux/arch/mips64/sgi-ip27/ip27-reset.c
Next file: linux/arch/mips64/sgi-ip27/ip27-setup.c
Previous file: linux/arch/mips64/sgi-ip27/ip27-pci.c
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
Sun Jul 9 22:18:16 2000
- Orig file:
v2.4.0-test2/linux/arch/mips64/sgi-ip27/ip27-reset.c
- Orig date:
Tue May 23 15:31:33 2000
diff -u --recursive --new-file v2.4.0-test2/linux/arch/mips64/sgi-ip27/ip27-reset.c linux/arch/mips64/sgi-ip27/ip27-reset.c
@@ -1,13 +1,12 @@
-/* $Id$
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Reset an IP27.
*
- * Copyright (C) 1997, 1998, 1999 by Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
+ * Copyright (C) 1997, 1998, 1999, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <linux/config.h>
#include <linux/kernel.h>
@@ -19,8 +18,6 @@
#include <asm/irq.h>
#include <asm/system.h>
#include <asm/sgialib.h>
-#include <asm/sgi/sgihpc.h>
-#include <asm/sgi/sgint23.h>
#include <asm/sn/addrs.h>
#include <asm/sn/arch.h>
#include <asm/sn/gda.h>
@@ -30,10 +27,14 @@
void machine_halt(void) __attribute__((noreturn));
void machine_power_off(void) __attribute__((noreturn));
+#define noreturn while(1); /* Silence gcc. */
+
/* XXX How to pass the reboot command to the firmware??? */
void machine_restart(char *command)
{
+#if 0
int i;
+#endif
printk("Reboot started from CPU %d\n", smp_processor_id());
#ifdef CONFIG_SMP
@@ -42,20 +43,31 @@
#if 0
for (i = 0; i < numnodes; i++)
REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
- PROMOP_RESTART);
+ PROMOP_REBOOT);
#else
LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
#endif
+ noreturn;
}
void machine_halt(void)
{
- ArcEnterInteractiveMode();
+ int i;
+
+#ifdef CONFIG_SMP
+ smp_send_stop();
+#endif
+ for (i = 0; i < numnodes; i++)
+ REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
+ PROMOP_RESTART);
+ LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
+ noreturn;
}
void machine_power_off(void)
{
/* To do ... */
+ noreturn;
}
void ip27_reboot_setup(void)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)