Date: Mon, 01 Dec 2003 17:32:15 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Jeff Roberson <jroberson@chesapeake.net> Cc: cvs-all@FreeBSD.org Subject: RE: cvs commit: src/sys/alpha/alpha mp_machdep.c Message-ID: <XFMail.20031201173215.jhb@FreeBSD.org> In-Reply-To: <20031201165303.C4201-100000@mail.chesapeake.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01-Dec-2003 Jeff Roberson wrote: > 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; That's a bug. > ia64 > mp_maxid = min(mp_ncpus, MAXCPU) - 1; This is correct. Note - 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; This should be cpus - 1. > 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. Heh. I am already waiting for approval from re@ to fix x86. That was definitely my bug. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20031201173215.jhb>