From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756259AbaKTGhT (ORCPT ); Thu, 20 Nov 2014 01:37:19 -0500 Received: from mail-ie0-f175.google.com ([209.85.223.175]:40088 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbaKTGhQ (ORCPT ); Thu, 20 Nov 2014 01:37:16 -0500 MIME-Version: 1.0 X-Originating-IP: [93.173.233.112] In-Reply-To: References: <1410553499-55951-1-git-send-email-s-anna@ti.com> <1410553499-55951-6-git-send-email-s-anna@ti.com> From: Ohad Ben-Cohen Date: Thu, 20 Nov 2014 08:36:55 +0200 Message-ID: Subject: Re: [PATCHv6 5/5] hwspinlock/omap: add support for dt nodes To: Bjorn Andersson Cc: Suman Anna , Mark Rutland , Kumar Gala , Tony Lindgren , Josh Cartwright , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , linux-arm Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, On Thu, Nov 20, 2014 at 2:43 AM, Bjorn Andersson wrote: > I still have a huge problem understanding the awesomeness with the > "base_id". If you have a SoC with 2 hwlock blocks; say 8+8 locks, used > for interaction with e.g. a modem and a video core respectively. > Why would you in either remote system offset the locks with 8? > Wouldn't e.g the modem use locks hwlock0:0-7 and video core use locks > hwlock1:0-7? Please see below > What systems use more than one hwlock block None that we know of. This concern was raised some time ago by Arnd and since it was easy to deal with we added the 'base_id' notion. > and do you know of any reasons why these hwlocks are globally numbered? Because on an heterogeneous asymmetric multiprocessing systems you sometimes have use cases where hwlocks are dynamically allocated and their id numbers need to be synchronized between user space applications, the Linux kernel, and entities running on remote processors (which are likely not running Linux). For this to work we have to have some system-wide global hwlocks naming that is predefined and known to all processors. A mere number seems like the simplest naming method. A dynamic hwlock request API could return "hwlock1:0" but a mere 8 seems easier to deal with. Thanks, Ohad.