Fix a bug where the index cpu is just plain wrong, thus the kernel

livelocks.

Reported by:	gonzo
This commit is contained in:
Attilio Rao 2011-05-22 20:19:01 +00:00
parent 76273fcba4
commit be044baf28
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/largeSMP/; revision=222193

View File

@ -210,8 +210,9 @@ cpu_mp_setmaxid(void)
last = 1;
while ((cpu = cpusetobj_ffs(&cpumask)) != 0) {
last = cpu;
mp_ncpus++;
cpu--;
CPU_CLR(cpu, &cpumask);
mp_ncpus++;
}
if (mp_ncpus <= 0)
mp_ncpus = 1;