aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjay Singh Rawat <sanjay.rawat@linaro.org>2014-06-04 11:27:18 +0530
committerAlexandra Yates <alexandra.yates@linux.intel.com>2014-06-04 14:25:39 -0700
commite70c89eb5d7b6b8f898bb126adefcbf3202d5acf (patch)
treee1106f49f9e57aa1fc88778708c301728bea94d6
parent291172b294178b4b638fa7b37340692f327cc2f5 (diff)
downloadpowertop-2.0-e70c89eb5d7b6b8f898bb126adefcbf3202d5acf.tar.gz
enumerate cpu based on different string on ARM
bogomips is removed by timer-backed delay loop (commit 9fc2105a) in ARM kernel. Using other suitable string to decide to enumerate each cpu. Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
-rw-r--r--src/cpu/cpu.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp
index b3b6166..105c066 100644
--- a/src/cpu/cpu.cpp
+++ b/src/cpu/cpu.cpp
@@ -296,6 +296,18 @@ void enumerate_cpus(void)
number = -2;
}
}
+ /* bogomips is removed in ARM, using CPU revision to enumerate */
+ if (strncasecmp(line, "CPU revision\t", 13) == 0) {
+ if (number == -1) {
+ /* Not all /proc/cpuinfo include "processor\t". */
+ number = 0;
+ }
+ if (number >= 0) {
+ handle_one_cpu(number, vendor, family, model);
+ set_max_cpu(number);
+ number = -2;
+ }
+ }
}