init: check printed flag to skip printing message

Otherwise the 'Calibration skipped' message gets printed everytime a CPU
is hotplugged in, cluttering console for systems that frequently hotplug
CPUs.

Signed-off-by: Diwakar Tundlam <[email protected]>
Cc: Phil Carmody <[email protected]>
Cc: Russell King <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Sameer Nanda <[email protected]>
Cc: Peter De Schrijver <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Diwakar Tundlam 2012-03-23 15:02:28 -07:00 • committed by Linus Torvalds
commit 8595c539f0

View file

@ -267,7 +267,8 @@ void __cpuinit calibrate_delay(void)
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
lpj = per_cpu(cpu_loops_per_jiffy, this_cpu);
pr_info("Calibrating delay loop (skipped) "
if (!printed)
pr_info("Calibrating delay loop (skipped) "
"already calibrated this CPU");
} else if (preset_lpj) {
lpj = preset_lpj;