From owner-freebsd-sparc64@FreeBSD.ORG Sat Sep 14 13:32:04 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 567CA3B3; Sat, 14 Sep 2013 13:32:04 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E5181273E; Sat, 14 Sep 2013 13:32:03 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.7/8.14.7/ALCHEMY.FRANKEN.DE) with ESMTP id r8EDVtJZ032862; Sat, 14 Sep 2013 15:31:56 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.7/8.14.7/Submit) id r8EDVtC9032861; Sat, 14 Sep 2013 15:31:55 +0200 (CEST) (envelope-from marius) Date: Sat, 14 Sep 2013 15:31:55 +0200 From: Marius Strobl To: Nathan Whitehorn Subject: Re: Patch for Cross-Reference Phandles Message-ID: <20130914133155.GA32845@alchemy.franken.de> References: <522CC7E0.9060508@freebsd.org> <5231D8A6.9080501@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5231D8A6.9080501@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arm@freebsd.org, freebsd-sparc64 , freebsd-ppc@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2013 13:32:04 -0000 On Thu, Sep 12, 2013 at 10:07:18AM -0500, Nathan Whitehorn wrote: > On 09/08/13 13:54, Nathan Whitehorn wrote: > > Open Firmware has three namespaces for handles: > > 1. Instance handles, for open devices > > 2. Package handles for the client interface > > 3. Package handles for device tree cross references > > > > On Powermac hardware, we assume that (2) and (3) are identical and > > call both phandles. On embedded FDT systems, you can't open devices > > and so we abuse ihandle_t for (3). IBM pSeries hardware, however, has > > all three things. With that in mind, I'd like to start separating > > them. The patch at > > http://people.freebsd.org/~nwhitehorn/xref_phandle.diff adds a new > > function (OF_child_xref_phandle) that takes a phandle of type (3) and > > turns into one of type (2) by searching for entries named "phandle", > > "ibm,phandle", or "linux,phandle" in the tree. This should work for > > FDT as well, but is not connected in the patch to anything actually > > FDT related. > > > > Comments would be appreciated. I'd like to get to get this as in as > > soon as possible (given the HEAD freeze) otherwise. > > -Nathan > > Since I haven't heard anything, it shouldn't affect any existing > platforms or code, and it would be nice to have this interface available > in the 10.x series, I plan to ask re@ for commit approval tomorrow. > Please let me know if there are any objections. Technically that patch is fine. It would be nice if you could fix the style bugs before committing, though. In OF_child_xref_phandle(), the variables should go above the comment and you don't need to initialize the static global one in ofw_pcibus.c to zero explicitly. If you do nevertheless, spaces should go before and after the '='. Marius