aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/idle/intel_idle.c
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2013-12-12 14:08:36 +0000
committerH. Peter Anvin <[email protected]>2013-12-19 19:54:44 +0000
commit16824255394f55adf31b9a96a9965d8c15bdac4c (patch)
treeb28f4a2d59db25700c8b4eafb2e3cfc188c121bc /drivers/idle/intel_idle.c
parentx86 idle: Repair large-server 50-watt idle-power regression (diff)
downloadkernel-16824255394f55adf31b9a96a9965d8c15bdac4c.tar.gz
kernel-16824255394f55adf31b9a96a9965d8c15bdac4c.zip
x86, acpi, idle: Restructure the mwait idle routines
People seem to delight in writing wrong and broken mwait idle routines; collapse the lot. This leaves mwait_play_dead() the sole remaining user of __mwait() and new __mwait() users are probably doing it wrong. Also remove __sti_mwait() as its unused. Cc: Arjan van de Ven <[email protected]> Cc: Jacob Jun Pan <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Len Brown <[email protected]> Cc: Rui Zhang <[email protected]> Acked-by: Rafael Wysocki <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'drivers/idle/intel_idle.c')
-rw-r--r--drivers/idle/intel_idle.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index f80b700f821c..efec4055fd5e 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -375,16 +375,7 @@ static int intel_idle(struct cpuidle_device *dev,
if (!(lapic_timer_reliable_states & (1 << (cstate))))
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
- if (!current_set_polling_and_test()) {
-
- if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR))
- clflush((void *)&current_thread_info()->flags);
-
- __monitor((void *)&current_thread_info()->flags, 0, 0);
- smp_mb();
- if (!need_resched())
- __mwait(eax, ecx);
- }
+ mwait_idle_with_hints(eax, ecx);
if (!(lapic_timer_reliable_states & (1 << (cstate))))
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);