Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / x86 / kernel / process.c
index dc8ca8e..8040b75 100644 (file)
@@ -582,9 +582,17 @@ int mwait_usable(const struct cpuinfo_x86 *c)
 {
        u32 eax, ebx, ecx, edx;
 
+       /* Use mwait if idle=mwait boot option is given */
        if (boot_option_idle_override == IDLE_FORCE_MWAIT)
                return 1;
 
+       /*
+        * Any idle= boot option other than idle=mwait means that we must not
+        * use mwait. Eg: idle=halt or idle=poll or idle=nomwait
+        */
+       if (boot_option_idle_override != IDLE_NO_OVERRIDE)
+               return 0;
+
        if (c->cpuid_level < MWAIT_INFO)
                return 0;