提交 15559722 编写于 作者: R Russell King 提交者: Russell King

[ARM] Fix /proc/cpuinfo format for ARM SMP

glibc expects to count lines beginning with "processor" to determine
the number of processors, not lines beginning with "Processor".  So,
give glibc the format it expects.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 32f8b97c
...@@ -839,7 +839,12 @@ static int c_show(struct seq_file *m, void *v) ...@@ -839,7 +839,12 @@ static int c_show(struct seq_file *m, void *v)
#if defined(CONFIG_SMP) #if defined(CONFIG_SMP)
for_each_online_cpu(i) { for_each_online_cpu(i) {
seq_printf(m, "Processor\t: %d\n", i); /*
* glibc reads /proc/cpuinfo to determine the number of
* online processors, looking for lines beginning with
* "processor". Give glibc what it expects.
*/
seq_printf(m, "processor\t: %d\n", i);
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n", seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n",
per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ), per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
(per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100); (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册