public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Resend: [PATCH] 2.6.12 Altix: enable poweroff
@ 2005-03-15 17:11 Aaron Young
  0 siblings, 0 replies; only message in thread
From: Aaron Young @ 2005-03-15 17:11 UTC (permalink / raw)
  To: linux-ia64



 Tony, I am resending. I didn't get any comments on the original post - can
 you take this ?

 Thanks,

 -Aaron Young (ayoung@sgi.com)

------
 This patch adds the necessary "hook" to allow SGI/SN
 machines to perform a system power off upon a 
 'init 0', 'halt -p', 'poweroff' or 'shutdown -h'.

 The "hook" is to set the pm_power_off callback
 to ia64_sn_power_down(). pm_power_off is checked
 in machine_power_off()/do_poweroff() and, if set, is executed. 
 ia64_sn_power_down() is a function already present (but not 
 used currently) in the sn kernel.
 ia64_sn_power_down() makes a SAL call to execute the
 power off.
 
 Signed-off-by: Aaron J Young <ayoung@sgi.com>

--- linux2.6.12/arch/ia64/sn/kernel/setup.c.orig        2005-03-04 14:14:36 
-06:00
+++ linux2.6.12/arch/ia64/sn/kernel/setup.c     2005-03-04 14:09:28 -06:00
@@ -29,6 +29,7 @@
 #include <linux/sched.h>
 #include <linux/root_dev.h>
 #include <linux/nodemask.h>
+#include <linux/pm.h>
 
 #include <asm/io.h>
 #include <asm/sal.h>
@@ -341,6 +342,14 @@ void __init sn_setup(char **cmdline_p)
        screen_info = sn_screen_info;
 
        sn_timer_init();
+
+       /*
+        * set pm_power_off to a SAL call to allow
+        * sn machines to power off. The SAL call can be replaced
+        * by an ACPI interface call when ACPI is fully implemented
+        * for sn.
+        */
+       pm_power_off = ia64_sn_power_down;
 }
 
 /**


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-15 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15 17:11 Resend: [PATCH] 2.6.12 Altix: enable poweroff Aaron Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox