]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] Fix num_cpus calculation in smp_call_function_map()
authorKevin Corry <kevcorry@us.ibm.com>
Tue, 31 Jul 2007 20:19:46 +0000 (06:19 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 3 Aug 2007 09:36:00 +0000 (19:36 +1000)
commit17aa3a82aa2173a22405f862c4444656f0494a3f
treef721aec8c56ce1d45958b80bc59d661e1ad5745b
parentcba684f56d7e8b82b08d4372375a42d6ebeab47d
[POWERPC] Fix num_cpus calculation in smp_call_function_map()

In smp_call_function_map(), num_cpus is set to the number of online
CPUs minus one.  However, if the CPU mask does not include all CPUs
(except the one we're running on), the routine will hang in the first
while() loop until the 8 second timeout occurs.

The num_cpus should be set to the number of CPUs specified in the mask
passed into the routine, after we've made any modifications to the
mask.  With this change, we can also get rid of the call to
cpus_empty() and avoid adding another pass through the bitmask.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/smp.c