Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebc4e05c authored by Stepan Moskovchenko's avatar Stepan Moskovchenko Committed by Matt Wagantall
Browse files

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: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
parent 189cd51b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -494,7 +494,6 @@ static int c_show(struct seq_file *m, void *v)
	for_each_online_cpu(i) {
		struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i);
		u32 midr = cpuinfo->reg_midr;

		/*
		 * glibc reads /proc/cpuinfo to determine the number of
		 * online processors, looking for lines beginning with