diff options
author | Corey Minyard <minyard@acm.org> | 2006-09-06 10:02:53 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-09-13 04:39:52 -0400 |
commit | 477bcae4c289a60f2303fbd4a3a875dcca647cf8 (patch) | |
tree | c9c7136011ad809d433e94c9bc482f7526c53627 /arch/ppc/kernel | |
parent | c3412dcb75ff4d64b44bedc72761d5707d19edf7 (diff) |
[POWERPC] Make function of pm_power_off consistent with x86
Allow the pm_power_off function variable in PPC to work as an override.
This makes the function consistent with the other architectures and it
allows generic poweroff operations (like those provided in IPMI
systems) to work properly on PPC.
Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Joseph Barnett <jbarnett@motorola.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/setup.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index a74f46d9826f..5458ac5da7c3 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -127,11 +127,8 @@ void machine_restart(char *cmd) | |||
127 | ppc_md.restart(cmd); | 127 | ppc_md.restart(cmd); |
128 | } | 128 | } |
129 | 129 | ||
130 | void machine_power_off(void) | 130 | static void ppc_generic_power_off(void) |
131 | { | 131 | { |
132 | #ifdef CONFIG_NVRAM | ||
133 | nvram_sync(); | ||
134 | #endif | ||
135 | ppc_md.power_off(); | 132 | ppc_md.power_off(); |
136 | } | 133 | } |
137 | 134 | ||
@@ -143,7 +140,17 @@ void machine_halt(void) | |||
143 | ppc_md.halt(); | 140 | ppc_md.halt(); |
144 | } | 141 | } |
145 | 142 | ||
146 | void (*pm_power_off)(void) = machine_power_off; | 143 | void (*pm_power_off)(void) = ppc_generic_power_off; |
144 | |||
145 | void machine_power_off(void) | ||
146 | { | ||
147 | #ifdef CONFIG_NVRAM | ||
148 | nvram_sync(); | ||
149 | #endif | ||
150 | if (pm_power_off) | ||
151 | pm_power_off(); | ||
152 | ppc_generic_power_off(); | ||
153 | } | ||
147 | 154 | ||
148 | #ifdef CONFIG_TAU | 155 | #ifdef CONFIG_TAU |
149 | extern u32 cpu_temp(unsigned long cpu); | 156 | extern u32 cpu_temp(unsigned long cpu); |