diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2008-03-26 20:38:31 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-01 05:43:07 -0400 |
commit | ca052f7924141f34998ab440bb4d908dc021a46b (patch) | |
tree | f84280e5932f214794afcbbe95d866eabcf0a3a7 /arch | |
parent | 5761eaa3a5ae3c7ea796add73b86176b7c963cca (diff) |
[POWERPC] PS3: Save power in busy loops on halt
PS3 save power on halt:
- Replace infinite busy loops by smarter loops calling
lv1_pause() to save power.
- Add ps3_halt() and ps3_sys_manager_halt().
- Add __noreturn annotations.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/ps3/setup.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 5c2cbb08eb52..c144669a0d3f 100644 --- a/arch/powerpc/platforms/ps3/setup.c +++ b/arch/powerpc/platforms/ps3/setup.c | |||
@@ -95,6 +95,14 @@ static void ps3_power_off(void) | |||
95 | ps3_sys_manager_power_off(); /* never returns */ | 95 | ps3_sys_manager_power_off(); /* never returns */ |
96 | } | 96 | } |
97 | 97 | ||
98 | static void ps3_halt(void) | ||
99 | { | ||
100 | DBG("%s:%d\n", __func__, __LINE__); | ||
101 | |||
102 | smp_send_stop(); | ||
103 | ps3_sys_manager_halt(); /* never returns */ | ||
104 | } | ||
105 | |||
98 | static void ps3_panic(char *str) | 106 | static void ps3_panic(char *str) |
99 | { | 107 | { |
100 | DBG("%s:%d %s\n", __func__, __LINE__, str); | 108 | DBG("%s:%d %s\n", __func__, __LINE__, str); |
@@ -105,7 +113,8 @@ static void ps3_panic(char *str) | |||
105 | printk(" Please press POWER button.\n"); | 113 | printk(" Please press POWER button.\n"); |
106 | printk("\n"); | 114 | printk("\n"); |
107 | 115 | ||
108 | while(1); | 116 | while(1) |
117 | lv1_pause(1); | ||
109 | } | 118 | } |
110 | 119 | ||
111 | #if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \ | 120 | #if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \ |
@@ -266,6 +275,7 @@ define_machine(ps3) { | |||
266 | .progress = ps3_progress, | 275 | .progress = ps3_progress, |
267 | .restart = ps3_restart, | 276 | .restart = ps3_restart, |
268 | .power_off = ps3_power_off, | 277 | .power_off = ps3_power_off, |
278 | .halt = ps3_halt, | ||
269 | #if defined(CONFIG_KEXEC) | 279 | #if defined(CONFIG_KEXEC) |
270 | .kexec_cpu_down = ps3_kexec_cpu_down, | 280 | .kexec_cpu_down = ps3_kexec_cpu_down, |
271 | .machine_kexec = default_machine_kexec, | 281 | .machine_kexec = default_machine_kexec, |