diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-11-26 01:52:44 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-12-22 04:43:50 -0500 |
commit | 1da1180c6e28cf21be356e2701978727558fa198 (patch) | |
tree | 713118e72323eb02f6c231d2c94deb0aa4ffcfa9 /arch/sh/kernel/process_64.c | |
parent | eb67cf14ae5c21609c200859d6f3eba71c591569 (diff) |
sh: Split out the idle loop for reuse between _32/_64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process_64.c')
-rw-r--r-- | arch/sh/kernel/process_64.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index b7aa09235b51..597cf02db3fc 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -33,56 +33,6 @@ | |||
33 | 33 | ||
34 | struct task_struct *last_task_used_math = NULL; | 34 | struct task_struct *last_task_used_math = NULL; |
35 | 35 | ||
36 | static int hlt_counter = 1; | ||
37 | |||
38 | #define HARD_IDLE_TIMEOUT (HZ / 3) | ||
39 | |||
40 | static int __init nohlt_setup(char *__unused) | ||
41 | { | ||
42 | hlt_counter = 1; | ||
43 | return 1; | ||
44 | } | ||
45 | |||
46 | static int __init hlt_setup(char *__unused) | ||
47 | { | ||
48 | hlt_counter = 0; | ||
49 | return 1; | ||
50 | } | ||
51 | |||
52 | __setup("nohlt", nohlt_setup); | ||
53 | __setup("hlt", hlt_setup); | ||
54 | |||
55 | static inline void hlt(void) | ||
56 | { | ||
57 | __asm__ __volatile__ ("sleep" : : : "memory"); | ||
58 | } | ||
59 | |||
60 | /* | ||
61 | * The idle loop on a uniprocessor SH.. | ||
62 | */ | ||
63 | void cpu_idle(void) | ||
64 | { | ||
65 | /* endless idle loop with no priority at all */ | ||
66 | while (1) { | ||
67 | if (hlt_counter) { | ||
68 | while (!need_resched()) | ||
69 | cpu_relax(); | ||
70 | } else { | ||
71 | local_irq_disable(); | ||
72 | while (!need_resched()) { | ||
73 | local_irq_enable(); | ||
74 | hlt(); | ||
75 | local_irq_disable(); | ||
76 | } | ||
77 | local_irq_enable(); | ||
78 | } | ||
79 | preempt_enable_no_resched(); | ||
80 | schedule(); | ||
81 | preempt_disable(); | ||
82 | } | ||
83 | |||
84 | } | ||
85 | |||
86 | void machine_restart(char * __unused) | 36 | void machine_restart(char * __unused) |
87 | { | 37 | { |
88 | extern void phys_stext(void); | 38 | extern void phys_stext(void); |
@@ -97,13 +47,6 @@ void machine_halt(void) | |||
97 | 47 | ||
98 | void machine_power_off(void) | 48 | void machine_power_off(void) |
99 | { | 49 | { |
100 | #if 0 | ||
101 | /* Disable watchdog timer */ | ||
102 | ctrl_outl(0xa5000000, WTCSR); | ||
103 | /* Configure deep standby on sleep */ | ||
104 | ctrl_outl(0x03, STBCR); | ||
105 | #endif | ||
106 | |||
107 | __asm__ __volatile__ ( | 50 | __asm__ __volatile__ ( |
108 | "sleep\n\t" | 51 | "sleep\n\t" |
109 | "synci\n\t" | 52 | "synci\n\t" |
@@ -113,9 +56,6 @@ void machine_power_off(void) | |||
113 | panic("Unexpected wakeup!\n"); | 56 | panic("Unexpected wakeup!\n"); |
114 | } | 57 | } |
115 | 58 | ||
116 | void (*pm_power_off)(void) = machine_power_off; | ||
117 | EXPORT_SYMBOL(pm_power_off); | ||
118 | |||
119 | void show_regs(struct pt_regs * regs) | 59 | void show_regs(struct pt_regs * regs) |
120 | { | 60 | { |
121 | unsigned long long ah, al, bh, bl, ch, cl; | 61 | unsigned long long ah, al, bh, bl, ch, cl; |