diff options
-rw-r--r-- | arch/x86/include/asm/mwait.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/mwait.h b/arch/x86/include/asm/mwait.h index 361b02ef128c..19b71c439256 100644 --- a/arch/x86/include/asm/mwait.h +++ b/arch/x86/include/asm/mwait.h | |||
@@ -43,8 +43,11 @@ static inline void __mwait(unsigned long eax, unsigned long ecx) | |||
43 | static inline void mwait_idle_with_hints(unsigned long eax, unsigned long ecx) | 43 | static inline void mwait_idle_with_hints(unsigned long eax, unsigned long ecx) |
44 | { | 44 | { |
45 | if (!current_set_polling_and_test()) { | 45 | if (!current_set_polling_and_test()) { |
46 | if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) | 46 | if (static_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) { |
47 | mb(); | ||
47 | clflush((void *)¤t_thread_info()->flags); | 48 | clflush((void *)¤t_thread_info()->flags); |
49 | mb(); | ||
50 | } | ||
48 | 51 | ||
49 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 52 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
50 | if (!need_resched()) | 53 | if (!need_resched()) |