aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2008-06-24 17:58:53 +0800
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 23:27:05 +0200
commitc1e3b377ad48febba6f91b8ae42c44ee4d4ab45e (patch)
tree7893e4226f52c4001150066f544415c1b17741f5 /arch
parent5b53496a5ad79e91052f72761a7c5516b069bc99 (diff)
ACPI: Create "idle=halt" bootparam
"idle=halt" limits the idle loop to using the halt instruction. No MWAIT, no IO accesses, no C-states deeper than C1. If something is broken in the idle code, "idle=halt" is a less severe workaround than "idle=poll" which disables all power savings. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/process.c2
-rw-r--r--arch/x86/kernel/process.c17
2 files changed, 18 insertions, 1 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index fabaf08d9a6..612b3c4a060 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -55,6 +55,8 @@ void (*ia64_mark_idle)(int);
unsigned long boot_option_idle_override = 0;
EXPORT_SYMBOL(boot_option_idle_override);
+unsigned long idle_halt;
+EXPORT_SYMBOL(idle_halt);
void
ia64_do_show_stack (struct unw_frame_info *info, void *arg)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 7dceea94723..7fc72949876 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -7,6 +7,10 @@
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/clockchips.h>
+#include <asm/system.h>
+
+unsigned long idle_halt;
+EXPORT_SYMBOL(idle_halt);
struct kmem_cache *task_xstate_cachep;
@@ -325,7 +329,18 @@ static int __init idle_setup(char *str)
pm_idle = poll_idle;
} else if (!strcmp(str, "mwait"))
force_mwait = 1;
- else
+ else if (!strcmp(str, "halt")) {
+ /*
+ * When the boot option of idle=halt is added, halt is
+ * forced to be used for CPU idle. In such case CPU C2/C3
+ * won't be used again.
+ * To continue to load the CPU idle driver, don't touch
+ * the boot_option_idle_override.
+ */
+ pm_idle = default_idle;
+ idle_halt = 1;
+ return 0;
+ } else
return -1;
boot_option_idle_override = 1;