From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965163AbbBBVPb (ORCPT ); Mon, 2 Feb 2015 16:15:31 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:35606 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964927AbbBBVP2 (ORCPT ); Mon, 2 Feb 2015 16:15:28 -0500 Message-ID: <54CFE8CE.2080804@ti.com> Date: Mon, 2 Feb 2015 15:14:54 -0600 From: Suman Anna User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ohad Ben-Cohen , Bjorn Andersson CC: Mark Rutland , 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 References: <1421269101-51105-1-git-send-email-s-anna@ti.com> <1421269101-51105-2-git-send-email-s-anna@ti.com> <20150115135201.GG16217@leverpostej> <20150115135556.GH16217@leverpostej> <20150116101746.GA21809@leverpostej> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/01/2015 05:00 AM, Ohad Ben-Cohen wrote: > On Sat, Jan 31, 2015 at 7:41 AM, Ohad Ben-Cohen wrote: >> On Sat, Jan 31, 2015 at 1:29 AM, Bjorn Andersson wrote: >>> In a system where you have two hwlock blocks lckA and lckB, each >>> consisting of 8 locks and you have dspB that can only access lckB >> >> This is a good example - thanks. To be able to cope with such cases we >> will have to pass a hwlock block reference and its relative lock id. So, you mean lckB is only between the host and dspB. Obviously, if it were shared between dspA and dspB only, then the allocation and management would be completely outside the host Linux driver's scope. > > Additionally, to support such a scenario, we can no longer retain the > simple dynamic allocation API we have today, because it might end up > allocating dspB an hwlock from IckA. > > We will have to make sure hwlocks are allocated only from pools > visible to the user, something that will change not only the > hwspinlock API but also the way it maintains the hwlocks. Right, the current API definitely will not scale for that. It was designed around the concept that it's easier to exchange a single global id, rather than a lcbB:id or some other similar semantics that needs to be interpreted. > > I suspect we want to wait for such hardware to show up first, and only > then add framework support for it. Agreed. regards Suman > Regardless, we obviously do want to > make sure our DT binding is prepared for the worse, so we'll drop the > "base-id" field. > > Thanks, > Ohad. >