From 25bd7d9bf28c102ebe50908c596047a2a405273b Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Thu, 16 Oct 2014 09:56:05 -0400 Subject: [PATCH] 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) --- arm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arm.c b/arm.c index 4c4b41b..c1e35e5 100644 --- a/arm.c +++ b/arm.c @@ -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); } /*