From owner-p4-projects@FreeBSD.ORG Wed Oct 27 17:08:01 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7668016A4D0; Wed, 27 Oct 2004 17:08:01 +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 5149016A4CE for ; Wed, 27 Oct 2004 17:08:01 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4624C43D3F for ; Wed, 27 Oct 2004 17:08:01 +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 i9RH81iP004395 for ; Wed, 27 Oct 2004 17:08:01 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9RH80Wt004392 for perforce@freebsd.org; Wed, 27 Oct 2004 17:08:00 GMT (envelope-from jhb@freebsd.org) Date: Wed, 27 Oct 2004 17:08:00 GMT Message-Id: <200410271708.i9RH80Wt004392@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 63831 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: Wed, 27 Oct 2004 17:08:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=63831 Change 63831 by jhb@jhb_slimer on 2004/10/27 17:07:08 Allow individual CPUs on i386 to be disabled via a hint. (hint.lapic.6.disabled=1 disables CPU with local APIC ID of 6.) Affected files ... .. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#70 edit Differences ... ==== //depot/projects/smpng/sys/i386/i386/mp_machdep.c#70 (text+ko) ==== @@ -635,9 +635,18 @@ /* start each AP */ for (cpu = 0, apic_id = 0; apic_id < MAXCPU; apic_id++) { + + /* Ignore non-existent CPUs and the BSP. */ if (!cpu_info[apic_id].cpu_present || cpu_info[apic_id].cpu_bsp) continue; + + /* Don't use this CPU if it has been disabled by a tunable. */ + if (resource_disabled("lapic", apic_id)) { + mp_ncpus--; + continue; + } + cpu++; /* save APIC ID for this logical ID */