arm64: show present cpu instead of online cpu in /proc/cpuinfo

Some userspace applications use /proc/cpuinfo to determine how many CPUs
the system has. CPU hotplug can offline a CPU at runtime and causing the
offline CPU not present in /proc/cpuinfo if we only show online cpu in
/proc/cpuinfo. Show all present CPUs in /proc/cpuinfo so that userspace
can take advantage of all availabie CPUs, even though some CPUs may have
been brought offline due to inactivity.

Change-Id: I6afe11e406c4a6ac0dd04d6abac11c2b68b9685a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
This commit is contained in:
Stepan Moskovchenko
2015-06-03 14:10:00 -07:00
committed by Venkata Narendra Kumar Gutta
parent 63eeb69d77
commit b8ac1ee238

View File

@@ -135,7 +135,7 @@ static int c_show(struct seq_file *m, void *v)
seq_printf(m, "Processor\t: AArch64 Processor rev %d (%s)\n",
read_cpuid_id() & 15, ELF_PLATFORM);
for_each_online_cpu(i) {
for_each_present_cpu(i) {
struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i);
u32 midr = cpuinfo->reg_midr;