diff options
| -rw-r--r-- | init/calibrate.c | 24 | ||||
| -rw-r--r-- | kernel/cpu.c | 5 |
2 files changed, 17 insertions, 12 deletions
diff --git a/init/calibrate.c b/init/calibrate.c index a379c9061199..6eb48e53d61c 100644 --- a/init/calibrate.c +++ b/init/calibrate.c | |||
| @@ -123,23 +123,26 @@ void __cpuinit calibrate_delay(void) | |||
| 123 | { | 123 | { |
| 124 | unsigned long ticks, loopbit; | 124 | unsigned long ticks, loopbit; |
| 125 | int lps_precision = LPS_PREC; | 125 | int lps_precision = LPS_PREC; |
| 126 | static bool printed; | ||
| 126 | 127 | ||
| 127 | if (preset_lpj) { | 128 | if (preset_lpj) { |
| 128 | loops_per_jiffy = preset_lpj; | 129 | loops_per_jiffy = preset_lpj; |
| 129 | printk(KERN_INFO | 130 | if (!printed) |
| 130 | "Calibrating delay loop (skipped) preset value.. "); | 131 | pr_info("Calibrating delay loop (skipped) " |
| 131 | } else if ((smp_processor_id() == 0) && lpj_fine) { | 132 | "preset value.. "); |
| 133 | } else if ((!printed) && lpj_fine) { | ||
| 132 | loops_per_jiffy = lpj_fine; | 134 | loops_per_jiffy = lpj_fine; |
| 133 | printk(KERN_INFO | 135 | pr_info("Calibrating delay loop (skipped), " |
| 134 | "Calibrating delay loop (skipped), " | ||
| 135 | "value calculated using timer frequency.. "); | 136 | "value calculated using timer frequency.. "); |
| 136 | } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) { | 137 | } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) { |
| 137 | printk(KERN_INFO | 138 | if (!printed) |
| 138 | "Calibrating delay using timer specific routine.. "); | 139 | pr_info("Calibrating delay using timer " |
| 140 | "specific routine.. "); | ||
| 139 | } else { | 141 | } else { |
| 140 | loops_per_jiffy = (1<<12); | 142 | loops_per_jiffy = (1<<12); |
| 141 | 143 | ||
| 142 | printk(KERN_INFO "Calibrating delay loop... "); | 144 | if (!printed) |
| 145 | pr_info("Calibrating delay loop... "); | ||
| 143 | while ((loops_per_jiffy <<= 1) != 0) { | 146 | while ((loops_per_jiffy <<= 1) != 0) { |
| 144 | /* wait for "start of" clock tick */ | 147 | /* wait for "start of" clock tick */ |
| 145 | ticks = jiffies; | 148 | ticks = jiffies; |
| @@ -170,7 +173,10 @@ void __cpuinit calibrate_delay(void) | |||
| 170 | loops_per_jiffy &= ~loopbit; | 173 | loops_per_jiffy &= ~loopbit; |
| 171 | } | 174 | } |
| 172 | } | 175 | } |
| 173 | printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n", | 176 | if (!printed) |
| 177 | pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", | ||
| 174 | loops_per_jiffy/(500000/HZ), | 178 | loops_per_jiffy/(500000/HZ), |
| 175 | (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); | 179 | (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); |
| 180 | |||
| 181 | printed = true; | ||
| 176 | } | 182 | } |
diff --git a/kernel/cpu.c b/kernel/cpu.c index 6ba0f1ecb212..7c4e2713df0a 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
| @@ -392,10 +392,9 @@ int disable_nonboot_cpus(void) | |||
| 392 | if (cpu == first_cpu) | 392 | if (cpu == first_cpu) |
| 393 | continue; | 393 | continue; |
| 394 | error = _cpu_down(cpu, 1); | 394 | error = _cpu_down(cpu, 1); |
| 395 | if (!error) { | 395 | if (!error) |
| 396 | cpumask_set_cpu(cpu, frozen_cpus); | 396 | cpumask_set_cpu(cpu, frozen_cpus); |
| 397 | printk("CPU%d is down\n", cpu); | 397 | else { |
| 398 | } else { | ||
| 399 | printk(KERN_ERR "Error taking CPU%d down: %d\n", | 398 | printk(KERN_ERR "Error taking CPU%d down: %d\n", |
| 400 | cpu, error); | 399 | cpu, error); |
| 401 | break; | 400 | break; |
