aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/process.c39
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);
306EXPORT_SYMBOL(pm_idle); 306EXPORT_SYMBOL(pm_idle);
307#endif 307#endif
308 308
309static inline int hlt_use_halt(void)
310{
311 return 1;
312}
313
314#ifndef CONFIG_SMP 309#ifndef CONFIG_SMP
315static inline void play_dead(void) 310static inline void play_dead(void)
316{ 311{
@@ -410,28 +405,22 @@ void cpu_idle(void)
410 */ 405 */
411void default_idle(void) 406void 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
437EXPORT_SYMBOL(default_idle); 426EXPORT_SYMBOL(default_idle);