Fix range-check error introduced in r182292. Also do not do anything

if all processors in the map are not available, simply return.

Approved by:	kib (mentor)
MFC after:	1 week
This commit is contained in:
Dmitry Chagin 2009-03-01 14:26:24 +00:00
parent 176273ea2b
commit 6485a22ccb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=189232

View File

@ -362,9 +362,11 @@ smp_rendezvous_cpus(cpumask_t map,
return;
}
for (i = 0; i < mp_maxid; i++)
for (i = 0; i <= mp_maxid; i++)
if (((1 << i) & map) != 0 && !CPU_ABSENT(i))
ncpus++;
if (ncpus == 0)
return;
/* obtain rendezvous lock */
mtx_lock_spin(&smp_ipi_mtx);