aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek2015-01-04 13:01:23 -0600
committerGreg Kroah-Hartman2015-01-16 08:59:34 -0600
commit3f4ddf1a9297a18b388463f89cee0bd60a064aca (patch)
treedd5537c2027790246bf801c962ace592dc211e00
parentdab35042ecb771edefc13e1620470919128d7900 (diff)
downloadkernel-audio-3f4ddf1a9297a18b388463f89cee0bd60a064aca.tar.gz
kernel-audio-3f4ddf1a9297a18b388463f89cee0bd60a064aca.tar.xz
kernel-audio-3f4ddf1a9297a18b388463f89cee0bd60a064aca.zip
Revert "ARM: 7830/1: delay: don't bother reporting bogomips in /proc/cpuinfo"
commit 4bf9636c39ac70da091d5a2e28d3448eaa7f115c upstream. Commit 9fc2105aeaaf ("ARM: 7830/1: delay: don't bother reporting bogomips in /proc/cpuinfo") breaks audio in python, and probably elsewhere, with message FATAL: cannot locate cpu MHz in /proc/cpuinfo I'm not the first one to hit it, see for example https://theredblacktree.wordpress.com/2014/08/10/fatal-cannot-locate-cpu-mhz-in-proccpuinfo/ https://devtalk.nvidia.com/default/topic/765800/workaround-for-fatal-cannot-locate-cpu-mhz-in-proc-cpuinf/?offset=1 Reading original changelog, I have to say "Stop breaking working setups. You know who you are!". Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/arm/kernel/setup.c9
-rw-r--r--arch/arm/kernel/smp.c13
2 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 1e8b030dbefd..aab70f657cd2 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -1021,6 +1021,15 @@ static int c_show(struct seq_file *m, void *v)
1021 seq_printf(m, "model name\t: %s rev %d (%s)\n", 1021 seq_printf(m, "model name\t: %s rev %d (%s)\n",
1022 cpu_name, cpuid & 15, elf_platform); 1022 cpu_name, cpuid & 15, elf_platform);
1023 1023
1024#if defined(CONFIG_SMP)
1025 seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
1026 per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
1027 (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
1028#else
1029 seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
1030 loops_per_jiffy / (500000/HZ),
1031 (loops_per_jiffy / (5000/HZ)) % 100);
1032#endif
1024 /* dump out the processor features */ 1033 /* dump out the processor features */
1025 seq_puts(m, "Features\t: "); 1034 seq_puts(m, "Features\t: ");
1026 1035
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index b7b4c86e338b..8cd3724714fe 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -388,8 +388,17 @@ asmlinkage void secondary_start_kernel(void)
388 388
389void __init smp_cpus_done(unsigned int max_cpus) 389void __init smp_cpus_done(unsigned int max_cpus)
390{ 390{
391 printk(KERN_INFO "SMP: Total of %d processors activated.\n", 391 int cpu;
392 num_online_cpus()); 392 unsigned long bogosum = 0;
393
394 for_each_online_cpu(cpu)
395 bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
396
397 printk(KERN_INFO "SMP: Total of %d processors activated "
398 "(%lu.%02lu BogoMIPS).\n",
399 num_online_cpus(),
400 bogosum / (500000/HZ),
401 (bogosum / (5000/HZ)) % 100);
393 402
394 hyp_mode_check(); 403 hyp_mode_check();
395} 404}