From owner-svn-src-stable-7@FreeBSD.ORG Tue Mar 9 13:08:58 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24BDC1065675; Tue, 9 Mar 2010 13:08:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13DEB8FC1B; Tue, 9 Mar 2010 13:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o29D8vZA023179; Tue, 9 Mar 2010 13:08:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29D8vF3023176; Tue, 9 Mar 2010 13:08:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003091308.o29D8vF3023176@svn.freebsd.org> From: John Baldwin Date: Tue, 9 Mar 2010 13:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204910 - in stable/7/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2010 13:08:58 -0000 Author: jhb Date: Tue Mar 9 13:08:57 2010 New Revision: 204910 URL: http://svn.freebsd.org/changeset/base/204910 Log: Don't include disabled CPUs in the topology map. ULE assumes that all CPUs in the topology map were present and enabled. Booting a system with hyperthreading and at least one CPU would cause ULE to attempt to use a disabled CPU when rebalancing load resulting in a panic. This is a direct commit to 7 as the topology code is different in 8 and later. Modified: stable/7/sys/amd64/amd64/mp_machdep.c stable/7/sys/i386/i386/mp_machdep.c Modified: stable/7/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/mp_machdep.c Tue Mar 9 10:31:03 2010 (r204909) +++ stable/7/sys/amd64/amd64/mp_machdep.c Tue Mar 9 13:08:57 2010 (r204910) @@ -200,7 +200,8 @@ mp_topology(void) group = &mp_groups[0]; groups = 1; for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) { - if (!cpu_info[apic_id].cpu_present) + if (!cpu_info[apic_id].cpu_present || + cpu_info[apic_id].cpu_disabled) continue; /* * If the current group has members and we're not a logical Modified: stable/7/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/7/sys/i386/i386/mp_machdep.c Tue Mar 9 10:31:03 2010 (r204909) +++ stable/7/sys/i386/i386/mp_machdep.c Tue Mar 9 13:08:57 2010 (r204910) @@ -255,7 +255,8 @@ mp_topology(void) group = &mp_groups[0]; groups = 1; for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) { - if (!cpu_info[apic_id].cpu_present) + if (!cpu_info[apic_id].cpu_present || + cpu_info[apic_id].cpu_disabled) continue; /* * If the current group has members and we're not a logical