From 2c0de1854008dd787c04aeb86366a4f9c2689769 Mon Sep 17 00:00:00 2001 From: "Srivatsa S. Bhat" Date: Mon, 30 Apr 2012 12:26:56 +0530 Subject: [PATCH] --- yaml --- r: 304990 b: refs/heads/master c: 19209bbb8612004bc20a1f70ff12926f99fe2643 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/process.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4eeb41faf6b0..636681247d01 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 489a71b029cd94e3b0132795146e8be3a87bf3fa +refs/heads/master: 19209bbb8612004bc20a1f70ff12926f99fe2643 diff --git a/trunk/arch/x86/kernel/process.c b/trunk/arch/x86/kernel/process.c index 1d92a5ab6e8b..ad57d832d96f 100644 --- a/trunk/arch/x86/kernel/process.c +++ b/trunk/arch/x86/kernel/process.c @@ -594,9 +594,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;