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

Commit f1829286 authored by Stepan Moskovchenko's avatar Stepan Moskovchenko
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>
parent 512fe370
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ static int c_show(struct seq_file *m, void *v)
	seq_printf(m, "Processor\t: %s rev %d (%s)\n",
		   cpu_name, read_cpuid_id() & 15, ELF_PLATFORM);

	for_each_online_cpu(i) {
	for_each_present_cpu(i) {
		/*
		 * glibc reads /proc/cpuinfo to determine the number of
		 * online processors, looking for lines beginning with