From owner-svn-src-projects@FreeBSD.ORG Sun May 22 20:19:01 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D73B1106564A; Sun, 22 May 2011 20:19:01 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8D048FC0C; Sun, 22 May 2011 20:19:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MKJ1qQ088945; Sun, 22 May 2011 20:19:01 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MKJ1gd088943; Sun, 22 May 2011 20:19:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105222019.p4MKJ1gd088943@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 May 2011 20:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222193 - projects/largeSMP/sys/mips/mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:19:01 -0000 Author: attilio Date: Sun May 22 20:19:01 2011 New Revision: 222193 URL: http://svn.freebsd.org/changeset/base/222193 Log: Fix a bug where the index cpu is just plain wrong, thus the kernel livelocks. Reported by: gonzo Modified: projects/largeSMP/sys/mips/mips/mp_machdep.c Modified: projects/largeSMP/sys/mips/mips/mp_machdep.c ============================================================================== --- projects/largeSMP/sys/mips/mips/mp_machdep.c Sun May 22 19:58:18 2011 (r222192) +++ projects/largeSMP/sys/mips/mips/mp_machdep.c Sun May 22 20:19:01 2011 (r222193) @@ -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;