From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752637AbbBKLga (ORCPT ); Wed, 11 Feb 2015 06:36:30 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:43062 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbbBKLg1 (ORCPT ); Wed, 11 Feb 2015 06:36:27 -0500 Date: Wed, 11 Feb 2015 11:35:53 +0000 From: Mark Rutland To: Ohad Ben-Cohen Cc: Bjorn Andersson , Suman Anna , Rob Herring , Kumar Gala , Josh Cartwright , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Rob Herring Subject: Re: [PATCH v7 1/4] Documentation: dt: add common bindings for hwspinlock Message-ID: <20150211113553.GE9154@leverpostej> References: <20150116101746.GA21809@leverpostej> <54CFE71E.20905@ti.com> <54D406BA.6060403@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Sorry I've been away from this thread for a while. On Wed, Feb 11, 2015 at 10:29:37AM +0000, Ohad Ben-Cohen wrote: > On Fri, Feb 6, 2015 at 2:34 AM, Bjorn Andersson wrote: > >> Yep, will do as soon as I hear from Ohad on what to do with the patch > >> "hwspinlock/core: maintain a list of registered hwspinlock banks" that I > >> dropped from v7. Without that and dropping hwlock-base-id, I can't get > >> the translations done. > >> > > > > My suggestion is to replace the global id-tree with a list of hwlocks > > and iterate over these if we ever get more than one driver registered. > > As long as #hwlock-drivers < log(#total-hwlocks) this should be > > faster. > > > > I would however argue that clients that would notice any kind of > > difference are using the API incorrectly. > > > > Unfortunately this is a somewhat larger change than just slapping DT > > support on the framework :/ > > I suspect we want to wait with framework changes until there's a real > hardware use case justifying them. > > With regard to DT, however, we obviously do want to be prepared for > multiple hwlock blocks even if they do not exist today. > > So how about adopting an approach where: > - DT fully supports multi hwlock blocks (i.e. no global id field) > - Framework left mostly unchanged at the moment. This means issuing an > explicit error in case a secondary hwlock block shows up, and then > hwlock id could trivially be the lock index. > > If multi hwlock hardware use case, or some new hwlock id translation > requirements, do show up in the future, it's always easy to add > framework support for it. At that point we'll know better what the > requirements are, and framework changes would be justifiable. As mentioned in my other reply I think we need to be explicit now when defining the set of hwlocks (and their namming/numbering) shared between a given set of processors, as we do with other resources (GPIOs/regulators/whatever). We also need to be explicit in describing the set of actors which use those locks. I think my previous proposal covered both of those. Thanks, Mark.