diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2012-10-25 12:13:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-26 06:25:03 -0400 |
commit | 4d0e42cc66f4e7e0bf08b29da1ae6ebd60549c4e (patch) | |
tree | 55b7753be0ec9cf952cfc81648924d0741cd3db6 /arch/x86/kernel/process.c | |
parent | 2ab3f29dddfb444c9fcc0a2f3a56ed4bdba41969 (diff) |
x86: Remove dead hlt_use_halt code
The hlt_use_halt function returns always true and there is only
one definition of it.
The default_idle function can then get ride of the if ...
statement and we can remove the else branch.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linaro-dev@lists.linaro.org
Cc: patches@linaro.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1351181591-8710-1-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index b644e1c765dc..2f99e3121875 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -306,11 +306,6 @@ void (*pm_idle)(void); | |||
306 | EXPORT_SYMBOL(pm_idle); | 306 | EXPORT_SYMBOL(pm_idle); |
307 | #endif | 307 | #endif |
308 | 308 | ||
309 | static inline int hlt_use_halt(void) | ||
310 | { | ||
311 | return 1; | ||
312 | } | ||
313 | |||
314 | #ifndef CONFIG_SMP | 309 | #ifndef CONFIG_SMP |
315 | static inline void play_dead(void) | 310 | static inline void play_dead(void) |
316 | { | 311 | { |
@@ -410,28 +405,22 @@ void cpu_idle(void) | |||
410 | */ | 405 | */ |
411 | void default_idle(void) | 406 | void default_idle(void) |
412 | { | 407 | { |
413 | if (hlt_use_halt()) { | 408 | trace_power_start_rcuidle(POWER_CSTATE, 1, smp_processor_id()); |
414 | trace_power_start_rcuidle(POWER_CSTATE, 1, smp_processor_id()); | 409 | trace_cpu_idle_rcuidle(1, smp_processor_id()); |
415 | trace_cpu_idle_rcuidle(1, smp_processor_id()); | 410 | current_thread_info()->status &= ~TS_POLLING; |
416 | current_thread_info()->status &= ~TS_POLLING; | 411 | /* |
417 | /* | 412 | * TS_POLLING-cleared state must be visible before we |
418 | * TS_POLLING-cleared state must be visible before we | 413 | * test NEED_RESCHED: |
419 | * test NEED_RESCHED: | 414 | */ |
420 | */ | 415 | smp_mb(); |
421 | smp_mb(); | ||
422 | 416 | ||
423 | if (!need_resched()) | 417 | if (!need_resched()) |
424 | safe_halt(); /* enables interrupts racelessly */ | 418 | safe_halt(); /* enables interrupts racelessly */ |
425 | else | 419 | else |
426 | local_irq_enable(); | ||
427 | current_thread_info()->status |= TS_POLLING; | ||
428 | trace_power_end_rcuidle(smp_processor_id()); | ||
429 | trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); | ||
430 | } else { | ||
431 | local_irq_enable(); | 420 | local_irq_enable(); |
432 | /* loop is done by the caller */ | 421 | current_thread_info()->status |= TS_POLLING; |
433 | cpu_relax(); | 422 | trace_power_end_rcuidle(smp_processor_id()); |
434 | } | 423 | trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); |
435 | } | 424 | } |
436 | #ifdef CONFIG_APM_MODULE | 425 | #ifdef CONFIG_APM_MODULE |
437 | EXPORT_SYMBOL(default_idle); | 426 | EXPORT_SYMBOL(default_idle); |