init: calibrate: don't print out bogomips value on boot
Shreshtha Sahu [Fri, 19 Jul 2013 05:27:26 +0000 (10:27 +0530)]
BogoMIPs is a confusing concept to the ill-informed, so allow
architectures to print it only if they find it worthwhile. The delay
calibration code should stick to lpj and avoid trying to draw any
correlation with BogoMIPs, which may be a fixed value derived from a
timer frequency independent of the CPU clock speed.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>

Patch picked from - https://lkml.org/lkml/2013/5/3/399

Bug 1320222

Change-Id: I6f08d6eea075a7ee0ab98e7c04ceb29ba350ee60
Signed-off-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/302229
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

init/calibrate.c

index fda0a7b..282a92a 100644 (file)
@@ -95,7 +95,7 @@ static unsigned long __cpuinit calibrate_delay_direct(void)
                 * >= 12.5% apart, redo calibration.
                 */
                if (start >= post_end)
-                       printk(KERN_NOTICE "calibrate_delay_direct() ignoring "
+                       pr_info("calibrate_delay_direct() ignoring "
                                        "timer_rate as we had a TSC wrap around"
                                        " start=%lu >=post_end=%lu\n",
                                start, post_end);
@@ -134,15 +134,13 @@ static unsigned long __cpuinit calibrate_delay_direct(void)
                good_timer_count = 0;
                if ((measured_times[max] - estimate) <
                                (estimate - measured_times[min])) {
-                       printk(KERN_NOTICE "calibrate_delay_direct() dropping "
-                                       "min bogoMips estimate %d = %lu\n",
-                               min, measured_times[min]);
+                       pr_info("%s() dropping min delay estimate %d = %lu\n",
+                               __func__, min, measured_times[min]);
                        measured_times[min] = 0;
                        min = max;
                } else {
-                       printk(KERN_NOTICE "calibrate_delay_direct() dropping "
-                                       "max bogoMips estimate %d = %lu\n",
-                               max, measured_times[max]);
+                       pr_info("%s() dropping max delay estimate %d = %lu\n",
+                               __func__, max, measured_times[max]);
                        measured_times[max] = 0;
                        max = min;
                }
@@ -160,7 +158,7 @@ static unsigned long __cpuinit calibrate_delay_direct(void)
 
        }
 
-       printk(KERN_NOTICE "calibrate_delay_direct() failed to get a good "
+       pr_info("calibrate_delay_direct() failed to get a good "
               "estimate for loops_per_jiffy.\nProbably due to long platform "
                "interrupts. Consider using \"lpj=\" boot option.\n");
        return 0;
@@ -292,9 +290,7 @@ void __cpuinit calibrate_delay(void)
        }
        per_cpu(cpu_loops_per_jiffy, this_cpu) = lpj;
        if (!printed)
-               pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
-                       lpj/(500000/HZ),
-                       (lpj/(5000/HZ)) % 100, lpj);
+               pr_cont("lpj=%lu\n", lpj);
 
        loops_per_jiffy = lpj;
        printed = true;