Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755384AbbHNNwP (ORCPT ); Fri, 14 Aug 2015 09:52:15 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36300 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755000AbbHNNwH (ORCPT ); Fri, 14 Aug 2015 09:52:07 -0400 Date: Fri, 14 Aug 2015 07:52:32 -0600 From: Lina Iyer To: Ohad Ben-Cohen Cc: Andy Gross , Bjorn Andersson , Jeffrey Hugo , "linux-arm-msm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RFC v2 0/2] hwspinlock: Introduce raw capability for hwspinlock_device Message-ID: <20150814135232.GB86880@linaro.org> References: <1433867020-7746-1-git-send-email-lina.iyer@linaro.org> <20150627030514.GA893@linaro.org> <20150702203028.GA4711@linaro.org> <20150728215122.GE51847@linaro.org> <20150813152508.GA4627@qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1386 Lines: 33 On Fri, Aug 14 2015 at 04:52 -0600, Ohad Ben-Cohen wrote: >On Thu, Aug 13, 2015 at 6:25 PM, Andy Gross wrote: >> The issue in hardwiring this into the driver itself means forfeiting >> extensibility. So on one side (w/ raw support), we get the ability to deal with >> the lock number changing. On the other side (w/o raw), we'd have to probably >> tie this to chip compat to figure out which lock is the 'special' if it ever >> changes. > >It sounds like the decision "which lock to use" is a separate problem >from "can it go raw". > Absolutely. >If the hardware doesn't prohibit raw mode, then every lock can be used >in raw mode. So you just have to pick one and make sure both sides >know which lock you use --- which is a classic multi-processor >synchronization issue. > >> It's arbitrary right now. The remote processor selected a number, not the >> processor running Linux. > >Is the number hardcoded right now? and you're using >hwspin_lock_request_specific on the Linux side to acquire the lock? > Yes, the number is hardcoded in the SPM power controller driver. It explicitly requests Lock #7 -- Lina -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/