Commit feae3203 authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar

timers, init: Limit the number of per cpu calibration bootup messages

Limit the number of per cpu calibration messages by only
printing out results for the first cpu to boot.

Also, don't print "CPUx is down" as this is expected, and we
don't need 4096 reminders... ;-)
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Tejun Heo <tj@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20091118002219.889552000@alcatraz.americas.sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ba5ea951
...@@ -123,23 +123,26 @@ void __cpuinit calibrate_delay(void) ...@@ -123,23 +123,26 @@ void __cpuinit calibrate_delay(void)
{ {
unsigned long ticks, loopbit; unsigned long ticks, loopbit;
int lps_precision = LPS_PREC; int lps_precision = LPS_PREC;
static bool printed;
if (preset_lpj) { if (preset_lpj) {
loops_per_jiffy = preset_lpj; loops_per_jiffy = preset_lpj;
printk(KERN_INFO if (!printed)
"Calibrating delay loop (skipped) preset value.. "); pr_info("Calibrating delay loop (skipped) "
} else if ((smp_processor_id() == 0) && lpj_fine) { "preset value.. ");
} else if ((!printed) && lpj_fine) {
loops_per_jiffy = lpj_fine; loops_per_jiffy = lpj_fine;
printk(KERN_INFO pr_info("Calibrating delay loop (skipped), "
"Calibrating delay loop (skipped), "
"value calculated using timer frequency.. "); "value calculated using timer frequency.. ");
} else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) { } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) {
printk(KERN_INFO if (!printed)
"Calibrating delay using timer specific routine.. "); pr_info("Calibrating delay using timer "
"specific routine.. ");
} else { } else {
loops_per_jiffy = (1<<12); loops_per_jiffy = (1<<12);
printk(KERN_INFO "Calibrating delay loop... "); if (!printed)
pr_info("Calibrating delay loop... ");
while ((loops_per_jiffy <<= 1) != 0) { while ((loops_per_jiffy <<= 1) != 0) {
/* wait for "start of" clock tick */ /* wait for "start of" clock tick */
ticks = jiffies; ticks = jiffies;
...@@ -170,7 +173,10 @@ void __cpuinit calibrate_delay(void) ...@@ -170,7 +173,10 @@ void __cpuinit calibrate_delay(void)
loops_per_jiffy &= ~loopbit; loops_per_jiffy &= ~loopbit;
} }
} }
printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n", if (!printed)
pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
loops_per_jiffy/(500000/HZ), loops_per_jiffy/(500000/HZ),
(loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);
printed = true;
} }
...@@ -392,10 +392,9 @@ int disable_nonboot_cpus(void) ...@@ -392,10 +392,9 @@ int disable_nonboot_cpus(void)
if (cpu == first_cpu) if (cpu == first_cpu)
continue; continue;
error = _cpu_down(cpu, 1); error = _cpu_down(cpu, 1);
if (!error) { if (!error)
cpumask_set_cpu(cpu, frozen_cpus); cpumask_set_cpu(cpu, frozen_cpus);
printk("CPU%d is down\n", cpu); else {
} else {
printk(KERN_ERR "Error taking CPU%d down: %d\n", printk(KERN_ERR "Error taking CPU%d down: %d\n",
cpu, error); cpu, error);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment