Skip to content

Commit

Permalink
[IA64-SGI] Altix: enable poweroff
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Aaron J Young authored and Tony Luck committed Apr 25, 2005
1 parent e1e1974 commit c1298c5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/ia64/sn/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -353,6 +354,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;
}

/**
Expand Down

0 comments on commit c1298c5

Please sign in to comment.