aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2008-06-24 06:01:09 -0400
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 17:27:05 -0400
commitda5e09a1b3e5a9fc0b15a3feb64e921ccc55ba74 (patch)
tree382a75c1180e458df826ef4efbc191f3f71275c1 /arch/x86/kernel/process.c
parentc1e3b377ad48febba6f91b8ae42c44ee4d4ab45e (diff)
ACPI : Create "idle=nomwait" bootparam
"idle=nomwait" disables the use of the MWAIT instruction from both C1 (C1_FFH) and deeper (C2C3_FFH) C-states. When MWAIT is unavailable, the BIOS and OS generally negotiate to use the HALT instruction for C1, and use IO accesses for deeper C-states. This option is useful for power and performance comparisons, and also to work around BIOS bugs where broken MWAIT support is advertised. http://bugzilla.kernel.org/show_bug.cgi?id=10807 http://bugzilla.kernel.org/show_bug.cgi?id=10914 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r--arch/x86/kernel/process.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 7fc729498760..4d629c62f4f8 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -11,6 +11,8 @@
11 11
12unsigned long idle_halt; 12unsigned long idle_halt;
13EXPORT_SYMBOL(idle_halt); 13EXPORT_SYMBOL(idle_halt);
14unsigned long idle_nomwait;
15EXPORT_SYMBOL(idle_nomwait);
14 16
15struct kmem_cache *task_xstate_cachep; 17struct kmem_cache *task_xstate_cachep;
16 18
@@ -340,6 +342,15 @@ static int __init idle_setup(char *str)
340 pm_idle = default_idle; 342 pm_idle = default_idle;
341 idle_halt = 1; 343 idle_halt = 1;
342 return 0; 344 return 0;
345 } else if (!strcmp(str, "nomwait")) {
346 /*
347 * If the boot option of "idle=nomwait" is added,
348 * it means that mwait will be disabled for CPU C2/C3
349 * states. In such case it won't touch the variable
350 * of boot_option_idle_override.
351 */
352 idle_nomwait = 1;
353 return 0;
343 } else 354 } else
344 return -1; 355 return -1;
345 356