aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-01-30 07:33:18 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:18 -0500
commit27415a4fe369e07a1393ae52c8ed8e48aabed5a9 (patch)
tree0988b70c690c8c674ce11e2cf857d00e10ead7a8 /arch/x86/kernel/process_64.c
parent2274c33ebdfbb848e7291849e662d36519b52bf4 (diff)
x86: move warning message of polling idle and HT enabled
The warning message at idle_setup() is never shown because smp_num_sibling hasn't been updated at this point yet. Move this polling idle and HT enabled warning to select_idle_routine(). I also implement this warning on 64-bit kernel. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r--arch/x86/kernel/process_64.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index dbe0a846ec52..95313532b2e0 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -291,20 +291,27 @@ static int mwait_usable(const struct cpuinfo_x86 *c)
291 291
292void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) 292void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
293{ 293{
294 static int printed; 294 static int selected;
295
296 if (selected)
297 return;
298#ifdef CONFIG_X86_SMP
299 if (pm_idle == poll_idle && smp_num_siblings > 1) {
300 printk(KERN_WARNING "WARNING: polling idle and HT enabled,"
301 " performance may degrade.\n");
302 }
303#endif
295 if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) { 304 if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) {
296 /* 305 /*
297 * Skip, if setup has overridden idle. 306 * Skip, if setup has overridden idle.
298 * One CPU supports mwait => All CPUs supports mwait 307 * One CPU supports mwait => All CPUs supports mwait
299 */ 308 */
300 if (!pm_idle) { 309 if (!pm_idle) {
301 if (!printed) { 310 printk(KERN_INFO "using mwait in idle threads.\n");
302 printk(KERN_INFO "using mwait in idle threads.\n");
303 printed = 1;
304 }
305 pm_idle = mwait_idle; 311 pm_idle = mwait_idle;
306 } 312 }
307 } 313 }
314 selected = 1;
308} 315}
309 316
310static int __init idle_setup(char *str) 317static int __init idle_setup(char *str)