Merge branch 'x86/pebs' into x86/unify-cpu-detect
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / x86 / kernel / process_64.c
index 91ffce47af8ec5401e8be094b39774f8dc843c57..08a9df08adbab9578887d72d3fc255069cb46e91 100644 (file)
@@ -51,6 +51,7 @@
 #include <asm/proto.h>
 #include <asm/ia32.h>
 #include <asm/idle.h>
+#include <asm/syscalls.h>
 
 asmlinkage extern void ret_from_fork(void);
 
@@ -93,14 +94,13 @@ DECLARE_PER_CPU(int, cpu_state);
 static inline void play_dead(void)
 {
        idle_task_exit();
-       wbinvd();
        mb();
        /* Ack it */
        __get_cpu_var(cpu_state) = CPU_DEAD;
 
        local_irq_disable();
-       while (1)
-               halt();
+       /* mask all interrupts, flush any and all caches, and halt */
+       wbinvd_halt();
 }
 #else
 static inline void play_dead(void)