From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH 5/6] OF: Introduce Device Tree resolve support. Date: Sat, 16 Mar 2013 09:24:35 +0000 Message-ID: <20130316092435.9FA4B3E095B@localhost> References: <1357327870-13615-1-git-send-email-panto@antoniou-consulting.com> <1357327870-13615-6-git-send-email-panto@antoniou-consulting.com> <20130121044836.GB24829@truffula.fritz.box> <20130122040524.GG23500@truffula.fritz.box> <20130123044041.GS23500@truffula.fritz.box> <060132B1-BB52-4C7F-B8D3-82B49BE49BB7@antoniou-consulting.com> Return-path: In-Reply-To: <060132B1-BB52-4C7F-B8D3-82B49BE49BB7@antoniou-consulting.com> Sender: linux-omap-owner@vger.kernel.org To: Pantelis Antoniou , David Gibson Cc: Rob Herring , Rob Landley , Jon Loeliger , Tony Lindgren , Stephen Warren , Benoit Cousson , Mitch Bradley , Alan Tull , linux-omap@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Porter , Russ Dill , Koen Kooi , Joel A Fernandes , Rob Clark , Jason Kridner , Matt Ranostay List-Id: devicetree@vger.kernel.org On Wed, 23 Jan 2013 12:58:02 +0200, Pantelis Antoniou wrote: > Hi David, > > On Jan 23, 2013, at 6:40 AM, David Gibson wrote: > > Ok. Nonetheless it's not hard to avoid a recursive approach here. > > How can I find the maximum phandle value of a subtree without using recursion. > Note that the whole function is just 6 lines long. It's a failure in the existing kernel DT data structures. We need a hash lookup for the phandles to eliminate the search entirely. Then you'd be able to allocated new phandles on the fly easily and resolve phandles without searching the whole tree (which has always been horrible). That said, I'd like to punt on the whole phandle resolution thing. The DT overlay support can be merged without the phandle resolution support if the core rejects any overlays with phandle collisions. g.