From owner-svn-src-projects@FreeBSD.ORG Mon May 30 21:23:00 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196E71065670; Mon, 30 May 2011 21:23:00 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id DEE3C8FC12; Mon, 30 May 2011 21:22:59 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LM000B00ZA9FB00@smtpauth2.wiscmail.wisc.edu>; Mon, 30 May 2011 15:22:57 -0500 (CDT) Received: from comporellon.tachypleus.net (adsl-71-150-248-94.dsl.mdsnwi.sbcglobal.net [71.150.248.94]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LM0006O7ZA83A00@smtpauth2.wiscmail.wisc.edu>; Mon, 30 May 2011 15:22:56 -0500 (CDT) Date: Mon, 30 May 2011 15:22:56 -0500 From: Nathan Whitehorn In-reply-to: <201105271202.04421.jhb@freebsd.org> To: John Baldwin Message-id: <4DE3FCA0.2000400@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=71.150.248.94 X-Spam-PmxInfo: Server=avs-14, Version=5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.5.30.201515, SenderIP=71.150.248.94 References: <201105271427.p4RERSUb039281@svn.freebsd.org> <201105271202.04421.jhb@freebsd.org> User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222356 - projects/pseries/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2011 21:23:00 -0000 On 05/27/11 11:02, John Baldwin wrote: > On Friday, May 27, 2011 10:27:28 am Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Fri May 27 14:27:28 2011 >> New Revision: 222356 >> URL: http://svn.freebsd.org/changeset/base/222356 >> >> Log: >> On multi-core, multi-threaded PPC systems, it is important that the threads >> be brought up in the order they are enumerated in the device tree (in >> particular, that thread 0 on each core be brought up first). The SLIST >> through which we loop to start the CPUs has all of its entries added with >> SLIST_INSERT_HEAD(), which means it is in reverse order of enumeration >> and so AP startup would always fail in such situation (causing a machine >> check or RTAS failure). >> >> The best fix is probably to change this from a LIST to a TAILQ, but fix >> this by looping through to add new cpus to the end of the list. > Just make it a STAILQ. That has a STAILQ_INSERT_TAIL() method and doesn't > change the ABI of 'struct pcpu'. It just adds an extra pointer to the head. I did that, and it works well. A patch against HEAD can be found at http://people.freebsd.org/~nwhitehorn/pcpu_tailq.diff. Let me know if it looks OK (or if there are any objections to committing it). -Nathan