Fix for the determination of the cpu count on 32-bit ARM 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-16 09:56:05 -04:00
parent 0c0f2e7440
commit 25bd7d9bf2

7
arm.c
View File

@ -1642,7 +1642,12 @@ arm_display_machine_stats(void)
static int
arm_get_smp_cpus(void)
{
return MAX(get_cpus_active(), get_cpus_online());
int cpus;
if ((cpus = get_cpus_present()))
return cpus;
else
return MAX(get_cpus_online(), get_highest_cpu_online()+1);
}
/*