From owner-p4-projects@FreeBSD.ORG Fri Oct 29 21:04:15 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D7F016A4D0; Fri, 29 Oct 2004 21:04:15 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4716A16A4CE for ; Fri, 29 Oct 2004 21:04:15 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B0FD43D54 for ; Fri, 29 Oct 2004 21:04:15 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9TL4FEL099450 for ; Fri, 29 Oct 2004 21:04:15 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9TL4EU4099447 for perforce@freebsd.org; Fri, 29 Oct 2004 21:04:14 GMT (envelope-from jhb@freebsd.org) Date: Fri, 29 Oct 2004 21:04:14 GMT Message-Id: <200410292104.i9TL4EU4099447@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 63947 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2004 21:04:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=63947 Change 63947 by jhb@jhb_slimer on 2004/10/29 21:04:05 Fix the announce code to handle disabled CPUs. Affected files ... .. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#71 edit Differences ... ==== //depot/projects/smpng/sys/i386/i386/mp_machdep.c#71 (text+ko) ==== @@ -197,6 +197,7 @@ struct cpu_info { int cpu_present:1; int cpu_bsp:1; + int cpu_disabled:1; } static cpu_info[MAXCPU]; static int cpu_apic_ids[MAXCPU]; @@ -419,9 +420,13 @@ /* List CPUs */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); for (i = 1, x = 0; x < MAXCPU; x++) { - if (cpu_info[x].cpu_present && !cpu_info[x].cpu_bsp) { - KASSERT(i < mp_ncpus, - ("mp_ncpus and actual cpus are out of whack")); + if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp) + continue; + KASSERT(i < mp_ncpus, + ("mp_ncpus and actual cpus are out of whack")); + if (cpu_info[x].cpu_disabled) + printf(" cpu (AP): APIC ID: %2d (disabled)\n", x); + else printf(" cpu%d (AP): APIC ID: %2d\n", i++, x); } } @@ -643,6 +648,7 @@ /* Don't use this CPU if it has been disabled by a tunable. */ if (resource_disabled("lapic", apic_id)) { + cpu_info[apic_id].cpu_disabled = 1; mp_ncpus--; continue; }