idle, x86: Allow off-lined CPU to enter deeper C states
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / x86 / kernel / smpboot.c
index 66d250c00d115bbaae4c7ab0917ce9c0dfe89643..93a2a0932b518a417c7467774560f7f686d4934e 100644 (file)
@@ -50,6 +50,7 @@
 #include <linux/tboot.h>
 #include <linux/stackprotector.h>
 #include <linux/gfp.h>
+#include <linux/cpuidle.h>
 
 #include <asm/acpi.h>
 #include <asm/desc.h>
@@ -1422,7 +1423,8 @@ void native_play_dead(void)
        tboot_shutdown(TB_SHUTDOWN_WFS);
 
        mwait_play_dead();      /* Only returns on failure */
-       hlt_play_dead();
+       if (cpuidle_play_dead())
+               hlt_play_dead();
 }
 
 #else /* ... !CONFIG_HOTPLUG_CPU */