int i, j;
u32 cpuid;
+# if defined(CONFIG_REPORT_PRESENT_CPUS)
+ for_each_present_cpu(i) {
+# else
for_each_online_cpu(i) {
+# endif
/*
* glibc reads /proc/cpuinfo to determine the number of
* online processors, looking for lines beginning with
/proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
/proc/kpagecount, and /proc/kpageflags. Disabling these
interfaces will reduce the size of the kernel by approximately 4kb.
+
+config REPORT_PRESENT_CPUS
+ default n
+ depends on PROC_FS && SMP
+ bool "Report present cpus instead of online cpus"
+ help
+ This is a work around to report Present CPUs instead of Online CPUs.
+ Some power savings implements use CPU hotplug for power domains.
+ It is a bug to enable this on a server or other architecture that
+ uses cpu hotplug in the correct way.
+
+
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];