Skip to content

Commit feae320

Browse files
Mike TravisIngo Molnar
authored andcommitted
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: Mike 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: Ingo Molnar <mingo@elte.hu>
1 parent ba5ea95 commit feae320

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

‎init/calibrate.c‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,26 @@ void __cpuinit calibrate_delay(void)
123123
{
124124
unsigned long ticks, loopbit;
125125
int lps_precision = LPS_PREC;
126+
static bool printed;
126127

127128
if (preset_lpj) {
128129
loops_per_jiffy = preset_lpj;
129-
printk(KERN_INFO
130-
"Calibrating delay loop (skipped) preset value.. ");
131-
} else if ((smp_processor_id() == 0) && lpj_fine) {
130+
if (!printed)
131+
pr_info("Calibrating delay loop (skipped) "
132+
"preset value.. ");
133+
} else if ((!printed) && lpj_fine) {
132134
loops_per_jiffy = lpj_fine;
133-
printk(KERN_INFO
134-
"Calibrating delay loop (skipped), "
135+
pr_info("Calibrating delay loop (skipped), "
135136
"value calculated using timer frequency.. ");
136137
} else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) {
137-
printk(KERN_INFO
138-
"Calibrating delay using timer specific routine.. ");
138+
if (!printed)
139+
pr_info("Calibrating delay using timer "
140+
"specific routine.. ");
139141
} else {
140142
loops_per_jiffy = (1<<12);
141143

142-
printk(KERN_INFO "Calibrating delay loop... ");
144+
if (!printed)
145+
pr_info("Calibrating delay loop... ");
143146
while ((loops_per_jiffy <<= 1) != 0) {
144147
/* wait for "start of" clock tick */
145148
ticks = jiffies;
@@ -170,7 +173,10 @@ void __cpuinit calibrate_delay(void)
170173
loops_per_jiffy &= ~loopbit;
171174
}
172175
}
173-
printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n",
176+
if (!printed)
177+
pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
174178
loops_per_jiffy/(500000/HZ),
175179
(loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);
180+
181+
printed = true;
176182
}

‎kernel/cpu.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,9 @@ int disable_nonboot_cpus(void)
392392
if (cpu == first_cpu)
393393
continue;
394394
error = _cpu_down(cpu, 1);
395-
if (!error) {
395+
if (!error)
396396
cpumask_set_cpu(cpu, frozen_cpus);
397-
printk("CPU%d is down\n", cpu);
398-
} else {
397+
else {
399398
printk(KERN_ERR "Error taking CPU%d down: %d\n",
400399
cpu, error);
401400
break;

0 commit comments

Comments
 (0)