init: check printed flag to skip printing message
Diwakar Tundlam [Thu, 8 Mar 2012 22:53:14 +0000 (14:53 -0800)]
Otherwise the 'Calibration skipped' message gets printed everytime a CPU is
hotplugged in, cluttering console for systems that frequently hotplug CPUs.

Change-Id: Ie0b4dc92a11d7518cfe6eb2100d8edadca4efb3e
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/88921
Reviewed-by: Satya Popuri <spopuri@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>

init/calibrate.c

index 24df797..6816bf2 100644 (file)
@@ -254,7 +254,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;