summaryrefslogtreecommitdiff
path: root/fs/proc/stat.c
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-06-21 15:44:35 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:32:22 -0700
commitfb828c70373de873d305efc64a5cefbce0db87a7 (patch)
tree0c4721b4765d8432a4839f63afe92d80d369f5fa /fs/proc/stat.c
parentd88720b6b4e4f6b353312bcb970992c3cf497982 (diff)
ARM: report present cpus instead of online CPUs
For machines that use hotplug to control special power domains, report present cpus in /proc/cpuinfo and /proc/stat instead of the standard of reporting online. This break hotplug behavior on all other platforms. The option is enabled using CONFIG_REPORT_PRESENT_CPUS Bug 849167 Original-Change-Id: Ib04bb73634b3a8c99592b1ac13eb471a8ecfd0c5 Reviewed-on: http://git-master/r/37732 Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Tested-by: Jonathan Mayo <jmayo@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Rebase-Id: R746f854d51a4b8f15774a547a3219acf7576bf6e
Diffstat (limited to 'fs/proc/stat.c')
-rw-r--r--fs/proc/stat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 1cf86c0e8689..36a15504b6e9 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -130,7 +130,12 @@ static int show_stat(struct seq_file *p, void *v)
seq_put_decimal_ull(p, ' ', cputime64_to_clock_t(guest_nice));
seq_putc(p, '\n');
+#if defined(CONFIG_REPORT_PRESENT_CPUS)
+ for_each_present_cpu(i) {
+#else
for_each_online_cpu(i) {
+#endif
+
/* Copy values here to work around gcc-2.95.3, gcc-2.96 */
user = kcpustat_cpu(i).cpustat[CPUTIME_USER];
nice = kcpustat_cpu(i).cpustat[CPUTIME_NICE];