diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-01-30 07:33:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:18 -0500 |
commit | 27415a4fe369e07a1393ae52c8ed8e48aabed5a9 (patch) | |
tree | 0988b70c690c8c674ce11e2cf857d00e10ead7a8 /arch/x86/kernel/process_32.c | |
parent | 2274c33ebdfbb848e7291849e662d36519b52bf4 (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_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 9f45a51af968..b72d7d132072 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -295,17 +295,27 @@ static int mwait_usable(const struct cpuinfo_x86 *c) | |||
295 | 295 | ||
296 | void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) | 296 | void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) |
297 | { | 297 | { |
298 | static int selected; | ||
299 | |||
300 | if (selected) | ||
301 | return; | ||
302 | #ifdef CONFIG_X86_SMP | ||
303 | if (pm_idle == poll_idle && smp_num_siblings > 1) { | ||
304 | printk(KERN_WARNING "WARNING: polling idle and HT enabled," | ||
305 | " performance may degrade.\n"); | ||
306 | } | ||
307 | #endif | ||
298 | if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) { | 308 | if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) { |
299 | printk("monitor/mwait feature present.\n"); | ||
300 | /* | 309 | /* |
301 | * Skip, if setup has overridden idle. | 310 | * Skip, if setup has overridden idle. |
302 | * One CPU supports mwait => All CPUs supports mwait | 311 | * One CPU supports mwait => All CPUs supports mwait |
303 | */ | 312 | */ |
304 | if (!pm_idle) { | 313 | if (!pm_idle) { |
305 | printk("using mwait in idle threads.\n"); | 314 | printk(KERN_INFO "using mwait in idle threads.\n"); |
306 | pm_idle = mwait_idle; | 315 | pm_idle = mwait_idle; |
307 | } | 316 | } |
308 | } | 317 | } |
318 | selected = 1; | ||
309 | } | 319 | } |
310 | 320 | ||
311 | static int __init idle_setup(char *str) | 321 | static int __init idle_setup(char *str) |
@@ -313,10 +323,6 @@ static int __init idle_setup(char *str) | |||
313 | if (!strcmp(str, "poll")) { | 323 | if (!strcmp(str, "poll")) { |
314 | printk("using polling idle threads.\n"); | 324 | printk("using polling idle threads.\n"); |
315 | pm_idle = poll_idle; | 325 | pm_idle = poll_idle; |
316 | #ifdef CONFIG_X86_SMP | ||
317 | if (smp_num_siblings > 1) | ||
318 | printk("WARNING: polling idle and HT enabled, performance may degrade.\n"); | ||
319 | #endif | ||
320 | } else if (!strcmp(str, "mwait")) | 326 | } else if (!strcmp(str, "mwait")) |
321 | force_mwait = 1; | 327 | force_mwait = 1; |
322 | else | 328 | else |