diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-20 02:42:52 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-20 02:42:52 -0500 |
commit | fbb82b03653cdb7fd1863b911e7540011259d2ce (patch) | |
tree | d5920f46068bb184a5322bc1505fb030adb6bfb6 /arch/sh/kernel/idle.c | |
parent | 2efa53b269ec1e9289a108e1506f53f6f1de440b (diff) |
sh: machine_ops based reboot support.
This provides a machine_ops-based reboot interface loosely cloned from
x86, and converts the native sh32 and sh64 cases over to it.
Necessary both for tying in SMP support and also enabling platforms like
SDK7786 to add support for their microcontroller-based power managers.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/idle.c')
-rw-r--r-- | arch/sh/kernel/idle.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 6b3d706deac1..0fd7b41f0a22 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -20,10 +20,9 @@ | |||
20 | #include <asm/system.h> | 20 | #include <asm/system.h> |
21 | #include <asm/atomic.h> | 21 | #include <asm/atomic.h> |
22 | 22 | ||
23 | static int hlt_counter; | ||
24 | void (*pm_idle)(void) = NULL; | 23 | void (*pm_idle)(void) = NULL; |
25 | void (*pm_power_off)(void); | 24 | |
26 | EXPORT_SYMBOL(pm_power_off); | 25 | static int hlt_counter; |
27 | 26 | ||
28 | static int __init nohlt_setup(char *__unused) | 27 | static int __init nohlt_setup(char *__unused) |
29 | { | 28 | { |
@@ -131,6 +130,15 @@ static void do_nothing(void *unused) | |||
131 | { | 130 | { |
132 | } | 131 | } |
133 | 132 | ||
133 | void stop_this_cpu(void *unused) | ||
134 | { | ||
135 | local_irq_disable(); | ||
136 | cpu_clear(smp_processor_id(), cpu_online_map); | ||
137 | |||
138 | for (;;) | ||
139 | cpu_sleep(); | ||
140 | } | ||
141 | |||
134 | /* | 142 | /* |
135 | * cpu_idle_wait - Used to ensure that all the CPUs discard old value of | 143 | * cpu_idle_wait - Used to ensure that all the CPUs discard old value of |
136 | * pm_idle and update to new pm_idle value. Required while changing pm_idle | 144 | * pm_idle and update to new pm_idle value. Required while changing pm_idle |