summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/smpboot.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 07bf4233441d..55c80ffb8719 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1422,9 +1422,9 @@ static inline void mwait_play_dead(void)
(highest_subcstate - 1);
}
+ wbinvd();
+
while (1) {
- mb();
- wbinvd();
__monitor(&current_thread_info()->flags, 0, 0);
mb();
__mwait(eax, 0);
@@ -1433,11 +1433,10 @@ static inline void mwait_play_dead(void)
static inline void hlt_play_dead(void)
{
+ if (current_cpu_data.x86 >= 4)
+ wbinvd();
+
while (1) {
- mb();
- if (current_cpu_data.x86 >= 4)
- wbinvd();
- mb();
native_halt();
}
}