aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/intel.c3
-rw-r--r--drivers/idle/intel_idle.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index dc1ec0dff939..ea04b342c026 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -387,7 +387,8 @@ static void init_intel(struct cpuinfo_x86 *c)
387 set_cpu_cap(c, X86_FEATURE_PEBS); 387 set_cpu_cap(c, X86_FEATURE_PEBS);
388 } 388 }
389 389
390 if (c->x86 == 6 && c->x86_model == 29 && cpu_has_clflush) 390 if (c->x86 == 6 && cpu_has_clflush &&
391 (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
391 set_cpu_cap(c, X86_FEATURE_CLFLUSH_MONITOR); 392 set_cpu_cap(c, X86_FEATURE_CLFLUSH_MONITOR);
392 393
393#ifdef CONFIG_X86_64 394#ifdef CONFIG_X86_64
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 92d1206482a6..f80b700f821c 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -377,6 +377,9 @@ static int intel_idle(struct cpuidle_device *dev,
377 377
378 if (!current_set_polling_and_test()) { 378 if (!current_set_polling_and_test()) {
379 379
380 if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR))
381 clflush((void *)&current_thread_info()->flags);
382
380 __monitor((void *)&current_thread_info()->flags, 0, 0); 383 __monitor((void *)&current_thread_info()->flags, 0, 0);
381 smp_mb(); 384 smp_mb();
382 if (!need_resched()) 385 if (!need_resched())