aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh64')
-rw-r--r--arch/sh64/kernel/process.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
index 0c09537449b3..b95d04141855 100644
--- a/arch/sh64/kernel/process.c
+++ b/arch/sh64/kernel/process.c
@@ -307,23 +307,19 @@ __setup("hlt", hlt_setup);
307 307
308static inline void hlt(void) 308static inline void hlt(void)
309{ 309{
310 if (hlt_counter)
311 return;
312
313 __asm__ __volatile__ ("sleep" : : : "memory"); 310 __asm__ __volatile__ ("sleep" : : : "memory");
314} 311}
315 312
316/* 313/*
317 * The idle loop on a uniprocessor SH.. 314 * The idle loop on a uniprocessor SH..
318 */ 315 */
319void default_idle(void) 316void cpu_idle(void)
320{ 317{
321 /* endless idle loop with no priority at all */ 318 /* endless idle loop with no priority at all */
322 while (1) { 319 while (1) {
323 if (hlt_counter) { 320 if (hlt_counter) {
324 while (1) 321 while (!need_resched())
325 if (need_resched()) 322 cpu_relax();
326 break;
327 } else { 323 } else {
328 local_irq_disable(); 324 local_irq_disable();
329 while (!need_resched()) { 325 while (!need_resched()) {
@@ -338,11 +334,7 @@ void default_idle(void)
338 schedule(); 334 schedule();
339 preempt_disable(); 335 preempt_disable();
340 } 336 }
341}
342 337
343void cpu_idle(void)
344{
345 default_idle();
346} 338}
347 339
348void machine_restart(char * __unused) 340void machine_restart(char * __unused)