All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3.1-rc9] ARM: populate processor tag in proc-cpuinfo for Uni-processor.
@ 2011-10-13 15:43 Srinivas KANDAGATLA
  2011-10-13 16:48 ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas KANDAGATLA @ 2011-10-13 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

From: Srinivas Kandagatla <srinivas.kandagatla@st.com>

This patch populates processor tag in /proc/cpuinfo for uni-processor too.
All the processors in kernel code do that.

Without this patch tools like cyclesoak which use processor tag to determine number of
cpus will be broken.

run cyclesoak -C on uniprocessor system to reproduce.

originally detected as part of 
https://bugzilla.stlinux.com/show_bug.cgi?id=14674 triage.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Chris Smith <chris.smith@st.com>
---
Hi All, 
We recently encountered issue while running cyclesoak on ARM-uniprocessor system, 
What we have noticed it that /proc/cpuinfo does not have "processor" tag when its uniprocessor, which looked incorrect.
All the processors code in kernel do populate this tag for both uni and multi processor systems.

This patch just add processor tag for cpuinfo for ARM uni-processor systems.

Thanks,
srini



 arch/arm/kernel/setup.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 621acad..4364071 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -807,7 +807,7 @@ static const char *hwcap_str[] = {
 
 static int c_show(struct seq_file *m, void *v)
 {
-	int i;
+	int i = 0;
 
 	seq_printf(m, "Processor\t: %s rev %d (%s)\n",
 		   cpu_name, read_cpuid_id() & 15, elf_platform);
@@ -825,6 +825,7 @@ static int c_show(struct seq_file *m, void *v)
 			   (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
 	}
 #else /* CONFIG_SMP */
+	seq_printf(m, "processor\t: %d\n", i);
 	seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
 		   loops_per_jiffy / (500000/HZ),
 		   (loops_per_jiffy / (5000/HZ)) % 100);
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-13 21:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 15:43 [PATCH v3.1-rc9] ARM: populate processor tag in proc-cpuinfo for Uni-processor Srinivas KANDAGATLA
2011-10-13 16:48 ` Russell King - ARM Linux
2011-10-13 20:52   ` Andrew Morton
2011-10-13 21:03     ` Russell King - ARM Linux
2011-10-13 21:31       ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.