From owner-p4-projects@FreeBSD.ORG Mon Apr 2 16:02:09 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E70DB16A403; Mon, 2 Apr 2007 16:02:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8887A16A40D for ; Mon, 2 Apr 2007 16:02:08 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.186]) by mx1.freebsd.org (Postfix) with ESMTP id 7384613C48A for ; Mon, 2 Apr 2007 16:02:08 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin04-en2 [10.13.10.149]) by smtpout.mac.com (Xserve/smtpout16/MantshX 4.0) with ESMTP id l32FN12Y005776; Mon, 2 Apr 2007 08:23:01 -0700 (PDT) Received: from [192.168.1.3] (c-24-6-177-228.hsd1.ca.comcast.net [24.6.177.228]) (authenticated bits=0) by mac.com (Xserve/smtpin04/MantshX 4.0) with ESMTP id l32FMs9j025712 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Apr 2007 08:22:56 -0700 (PDT) In-Reply-To: <200704020915.03985.jhb@freebsd.org> References: <200704012152.l31LqHuB022635@repoman.freebsd.org> <200704020915.03985.jhb@freebsd.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Mon, 2 Apr 2007 08:22:09 -0700 To: John Baldwin X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 117140 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 16:02:09 -0000 On Apr 2, 2007, at 6:15 AM, John Baldwin wrote: > On Sunday 01 April 2007 05:52:17 pm Marcel Moolenaar wrote: >> http://perforce.freebsd.org/chv.cgi?CH=117140 >> >> Change 117140 by marcel@marcel_xcllnt on 2007/04/01 21:52:12 >> >> Create PCPU structures for all CPUs. Reduce dependency >> on MAXCPU by allocating PCPU structures on demand. >> >> Affected files ... >> >> .. //depot/projects/powerpc/sys/powerpc/include/pcpu.h#6 edit >> .. //depot/projects/powerpc/sys/powerpc/powerpc/machdep.c#8 edit >> .. //depot/projects/powerpc/sys/powerpc/powerpc/mp_machdep.c#9 edit >> .. //depot/projects/powerpc/sys/powerpc/powerpc/ofw_machdep.c#7 edit >> >> Differences ... >> >> ==== //depot/projects/powerpc/sys/powerpc/include/pcpu.h#6 (text >> +ko) ==== >> >> @@ -40,6 +40,7 @@ >> int pc_inside_intr; \ >> struct pmap *pc_curpmap; /* current pmap */ \ >> struct thread *pc_fputhread; /* current fpu user */ \ >> + int pc_bsp:1; \ > > FYI, other places in MI code assume that CPU 0 (pc_cpuid) is the BSP. Not a problem so far, but it's probably better to eliminate that assumption. If firmware is to select the BSP and there's no requirement for it to select CPU0, then there will be situations where it will not select CPU0. One such situation is when CPU0 is disabled. For example, to analyze machine checks on on pluto1, I disabled CPU0 and CPU1 in succession to see if one of the CPUs was the cause of the MC. As such, CPU1 had to be the BSP when CPU0 was disabled. Luckily pluto1 is only a dual-CPU machine, so that disabling a CPU also stops SMP operation :-) -- Marcel Moolenaar xcllnt@mac.com