diff options
author | attilio <attilio@FreeBSD.org> | 2011-05-22 20:19:01 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-05-22 20:19:01 +0000 |
commit | 58bd8f51970aaf3192e8efade58fe9548c2b150a (patch) | |
tree | 19e0e10401166395c470fde78ac67cdb4e92e6d5 /sys | |
parent | ef763b9a6b7b6d419b117f16e762dacda02d33bb (diff) | |
download | FreeBSD-src-58bd8f51970aaf3192e8efade58fe9548c2b150a.zip FreeBSD-src-58bd8f51970aaf3192e8efade58fe9548c2b150a.tar.gz |
Fix a bug where the index cpu is just plain wrong, thus the kernel
livelocks.
Reported by: gonzo
Diffstat (limited to 'sys')
-rw-r--r-- | sys/mips/mips/mp_machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/mips/mips/mp_machdep.c b/sys/mips/mips/mp_machdep.c index 289c0a7..8c93bd1 100644 --- a/sys/mips/mips/mp_machdep.c +++ b/sys/mips/mips/mp_machdep.c @@ -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; |