From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752062AbbFFD3R (ORCPT ); Fri, 5 Jun 2015 23:29:17 -0400 Received: from mail-ig0-f175.google.com ([209.85.213.175]:34470 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168AbbFFD3J (ORCPT ); Fri, 5 Jun 2015 23:29:09 -0400 MIME-Version: 1.0 X-Originating-IP: [109.186.38.88] In-Reply-To: <557235C1.3020001@codeaurora.org> References: <1430500026-47990-1-git-send-email-lina.iyer@linaro.org> <20150511144608.GB16124@linaro.org> <20150518150302.GA23206@linaro.org> <20150526203634.GL23206@linaro.org> <557235C1.3020001@codeaurora.org> From: Ohad Ben-Cohen Date: Sat, 6 Jun 2015 06:28:48 +0300 Message-ID: Subject: Re: [PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock To: Jeffrey Hugo Cc: Lina Iyer , "Anna, Suman" , Bjorn Andersson , Andy Gross , "linux-arm-msm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Kumar Gala Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 6, 2015 at 2:50 AM, Jeffrey Hugo wrote: > If you still wish to scope out a capability based alternative, would you > please provide some details about how you envision it working? An example > of the API, how it would be used, future usecases that might be covered by > it, etc. That would give us specifics we can discuss and weigh the merits > of. How about: - add a 'hwcaps' member to hwspinlock_device, and define single cap called HWL_CAP_ALLOW_RAW - add new 'hwcaps' parameter to hwspin_lock_register - omap_hwspinlock.c will pass NULL, qcom_hwspinlock will pass HWL_CAP_ALLOW_RAW - hwspin_lock_register will set hwcaps accordingly - before a lock is taken in RAW mode, the capabilities are checked - document everything nicely Unless I'm missing something, it should take 5 minutes or less. For reference, feel free to check out mmc_host's caps member and its usage. Thanks, Ohad.