fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / mips / sgi-ip27 / ip27-reset.c
index aa19dc1..c170761 100644 (file)
@@ -5,15 +5,16 @@
  *
  * Reset an IP27.
  *
- * Copyright (C) 1997, 1998, 1999, 2000 by Ralf Baechle
+ * Copyright (C) 1997, 1998, 1999, 2000, 06 by Ralf Baechle
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/smp.h>
 #include <linux/mmzone.h>
+#include <linux/nodemask.h>
+#include <linux/pm.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -43,7 +44,7 @@ static void ip27_machine_restart(char *command)
        smp_send_stop();
 #endif
 #if 0
-       for (i = 0; i < numnodes; i++)
+       for_each_online_node(i)
                REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
                                                        PROMOP_REBOOT);
 #else
@@ -59,7 +60,7 @@ static void ip27_machine_halt(void)
 #ifdef CONFIG_SMP
        smp_send_stop();
 #endif
-       for (i = 0; i < numnodes; i++)
+       for_each_online_node(i)
                REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
                                                        PROMOP_RESTART);
        LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
@@ -76,5 +77,5 @@ void ip27_reboot_setup(void)
 {
        _machine_restart = ip27_machine_restart;
        _machine_halt = ip27_machine_halt;
-       _machine_power_off = ip27_machine_power_off;
+       pm_power_off = ip27_machine_power_off;
 }