Fix for the determination of the cpu count on ARM64 machines.

Without the patch, if certain patterns of cpus are offline, the count
may be too small, causing cpu-dependent commands to not recognize
online cpus.
(Jan.Karlsson@sonymobile.com, anderson@redhat.com)
This commit is contained in:
Dave Anderson 2014-10-17 10:30:11 -04:00
parent 86aa3c1cef
commit 3e61decc7e

View File

@ -1444,7 +1444,12 @@ arm64_display_machine_stats(void)
static int
arm64_get_smp_cpus(void)
{
return MAX(get_cpus_online(), get_highest_cpu_online()+1);
int cpus;
if ((cpus = get_cpus_present()))
return cpus;
else
return MAX(get_cpus_online(), get_highest_cpu_online()+1);
}