From owner-cvs-src@FreeBSD.ORG Mon Dec 1 13:58:23 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6744116A4D3; Mon, 1 Dec 2003 13:58:23 -0800 (PST) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA7ED4400F; Mon, 1 Dec 2003 13:55:54 -0800 (PST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id hB1Ltsl91537; Mon, 1 Dec 2003 16:55:54 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Mon, 1 Dec 2003 16:55:54 -0500 (EST) From: Jeff Roberson To: John Baldwin In-Reply-To: Message-ID: <20031201165303.C4201-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: Jeff Roberson cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: RE: cvs commit: src/sys/alpha/alpha mp_machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2003 21:58:23 -0000 On Mon, 1 Dec 2003, John Baldwin wrote: > > On 30-Nov-2003 Jeff Roberson wrote: > > jeff 2003/11/30 14:08:24 PST > > > > FreeBSD src repository > > > > Modified files: > > sys/alpha/alpha mp_machdep.c > > Log: > > - Set mp_maxid in a way that is consistent with every other arch. It is > > one more than the last valid 'cpuid'. > > > > Approved by: re (rwatson) > > Eh? No it's not. All that needs to be true is that for every processor, > PCPU_GET(cpuid) <= mp_maxid. > > It can be equal to the highest ID and should be so for most cases. >From x86's mp_machdep: mp_maxid = MAXCPU; ia64 mp_maxid = min(mp_ncpus, MAXCPU) - 1; sparc64 cpus = 0; root = OF_peer(0); for (child = OF_child(root); child != 0; child = OF_peer(child)) { if (OF_getprop(child, "device_type", buf, sizeof(buf)) > 0 && strcmp(buf, "cpu") == 0) cpus++; } mp_maxid = cpus; And I just changed amd64 and alpha to mean maxid + 1. Damn. it looks like just sparc64 and x86 were wrong. Maybe I should change those to mean the right thing, and backout the changes to uma. yack. > > -- > > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ >