From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754792AbbCMV1v (ORCPT ); Fri, 13 Mar 2015 17:27:51 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:35272 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211AbbCMV1u (ORCPT ); Fri, 13 Mar 2015 17:27:50 -0400 Date: Fri, 13 Mar 2015 15:27:48 -0600 From: Lina Iyer To: Andy Gross Cc: Stephen Boyd , bjorn.andersson@sonymobile.com, linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, ohad@wizery.com Subject: Re: [PATCH] Lock 7 is cpuidle specific, use non-generic value for locking Message-ID: <20150313212748.GJ497@linaro.org> References: <1425076217-10415-2-git-send-email-bjorn.andersson@sonymobile.com> <1426189108-35488-1-git-send-email-lina.iyer@linaro.org> <5501F889.1020800@codeaurora.org> <20150312204859.GD497@linaro.org> <55020142.80202@codeaurora.org> <20150312221600.GF497@linaro.org> <20150313200204.GB16977@qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20150313200204.GB16977@qualcomm.com> 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 On Fri, Mar 13 2015 at 14:02 -0600, Andy Gross wrote: >On Thu, Mar 12, 2015 at 04:16:00PM -0600, Lina Iyer wrote: > > > >> >It looks like the remote side unlocks it too? It doesn't seem like this >> >will work with the framework very well. The framework has a kernel >> >spinlock attached to the hwspinlock so when we lock the hwspinlock we >> >also lock the kernel spinlock and we only release the kernel spinlock >> >when the kernel unlocks the hwspinlock. In this case it seems like >> >cpuidle wants to have it's own kernel spinlock and just use the trylock >> >loop part of __hwspin_lock_timeout() without taking any kernel side >> >locks. Plus it wants to write a specific value to the lock. >> > >> Right. >> Just noticed that part of the hwspinlock. Yes SCM unlocks the >> hwspinlock. So I cannot hold any lock in Linux. May need changes in the >> hwspinlock framework. Seems like an additional flag in hwspinlock to not >> lock any in the trylock path work work. Hmm.... > >Or a specific EXPORT function for this one usecase which is unlike anyone elses >usage. I think, this can be handled well within the QCOM driver. I will submit a patch for it and we can discuss then later. For now, this will work fine as is. Lina > >-- >Qualcomm Innovation Center, Inc. >The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, >a Linux Foundation Collaborative Project >