diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index ba370dc8685b..b3078f4ce25b 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -139,27 +139,23 @@ static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) | |||
139 | 139 | ||
140 | void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) | 140 | void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) |
141 | { | 141 | { |
142 | static int selected; | ||
143 | |||
144 | if (selected) | ||
145 | return; | ||
146 | #ifdef CONFIG_X86_SMP | 142 | #ifdef CONFIG_X86_SMP |
147 | if (pm_idle == poll_idle && smp_num_siblings > 1) { | 143 | if (pm_idle == poll_idle && smp_num_siblings > 1) { |
148 | printk(KERN_WARNING "WARNING: polling idle and HT enabled," | 144 | printk(KERN_WARNING "WARNING: polling idle and HT enabled," |
149 | " performance may degrade.\n"); | 145 | " performance may degrade.\n"); |
150 | } | 146 | } |
151 | #endif | 147 | #endif |
148 | if (pm_idle) | ||
149 | return; | ||
150 | |||
152 | if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) { | 151 | if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) { |
153 | /* | 152 | /* |
154 | * Skip, if setup has overridden idle. | ||
155 | * One CPU supports mwait => All CPUs supports mwait | 153 | * One CPU supports mwait => All CPUs supports mwait |
156 | */ | 154 | */ |
157 | if (!pm_idle) { | 155 | printk(KERN_INFO "using mwait in idle threads.\n"); |
158 | printk(KERN_INFO "using mwait in idle threads.\n"); | 156 | pm_idle = mwait_idle; |
159 | pm_idle = mwait_idle; | 157 | } else |
160 | } | 158 | pm_idle = default_idle; |
161 | } | ||
162 | selected = 1; | ||
163 | } | 159 | } |
164 | 160 | ||
165 | static int __init idle_setup(char *str) | 161 | static int __init idle_setup(char *str) |