diff options
Diffstat (limited to 'arch/sh64/kernel/process.c')
| -rw-r--r-- | arch/sh64/kernel/process.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c index efde41c0cd66..b95d04141855 100644 --- a/arch/sh64/kernel/process.c +++ b/arch/sh64/kernel/process.c | |||
| @@ -307,23 +307,19 @@ __setup("hlt", hlt_setup); | |||
| 307 | 307 | ||
| 308 | static inline void hlt(void) | 308 | static 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 | */ |
| 319 | void default_idle(void) | 316 | void 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()) { |
| @@ -334,13 +330,11 @@ void default_idle(void) | |||
| 334 | } | 330 | } |
| 335 | local_irq_enable(); | 331 | local_irq_enable(); |
| 336 | } | 332 | } |
| 333 | preempt_enable_no_resched(); | ||
| 337 | schedule(); | 334 | schedule(); |
| 335 | preempt_disable(); | ||
| 338 | } | 336 | } |
| 339 | } | ||
| 340 | 337 | ||
| 341 | void cpu_idle(void) | ||
| 342 | { | ||
| 343 | default_idle(); | ||
| 344 | } | 338 | } |
| 345 | 339 | ||
| 346 | void machine_restart(char * __unused) | 340 | void machine_restart(char * __unused) |
