From 7177784edb22ef78b0712092a4174956bc14e8bd Mon Sep 17 00:00:00 2001 From: Zwane Mwaikambo Date: Mon, 23 Aug 2004 21:27:55 -0700 Subject: [PATCH] [PATCH] fix i386/x86_64 idle routine selection This was broken when the mwait stuff went in since it executes after the initial idle_setup() has already selected an idle routine and overrides it with default_idle. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/kernel/process.c | 7 +------ arch/x86_64/kernel/process.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 477c68eeb979e..346dda408500e 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -183,18 +183,13 @@ void __init select_idle_routine(const struct cpuinfo_x86 *c) printk("monitor/mwait feature present.\n"); /* * Skip, if setup has overridden idle. - * Also, take care of system with asymmetric CPUs. - * Use, mwait_idle only if all cpus support it. - * If not, we fallback to default_idle() + * One CPU supports mwait => All CPUs supports mwait */ if (!pm_idle) { printk("using mwait in idle threads.\n"); pm_idle = mwait_idle; } - return; } - pm_idle = default_idle; - return; } static int __init idle_setup (char *str) diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 3d3f6c5e063ae..9510c46a75466 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -168,9 +168,7 @@ void __init select_idle_routine(const struct cpuinfo_x86 *c) if (cpu_has(c, X86_FEATURE_MWAIT)) { /* * Skip, if setup has overridden idle. - * Also, take care of system with asymmetric CPUs. - * Use, mwait_idle only if all cpus support it. - * If not, we fallback to default_idle() + * One CPU supports mwait => All CPUs supports mwait */ if (!pm_idle) { if (!printed) { @@ -179,10 +177,7 @@ void __init select_idle_routine(const struct cpuinfo_x86 *c) } pm_idle = mwait_idle; } - return; } - pm_idle = default_idle; - return; } static int __init idle_setup (char *str) -- 2.53.0