Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Ohad Ben-Cohen Newsgroups: linux.kernel Subject: Re: [PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock Date: Sat, 06 Jun 2015 05:30:02 +0200 Message-ID: References: X-Original-To: Jeffrey Hugo X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=55qcxGUoX4Lotq9X4ylDI65jUxTEPqgt2EXyvhqo2wE=; b=WzljnTmB2a1rTe/UmsAFVrO0aGgnSP22qgsbqOcnM2y3cw/YBXznxrBulb59taWdgk 4xhoRfYUfEqsj9HDz8LgguSS0KwHRf7pys8xGKMFJMAJjaxEI5c1mrgpIbuuyakOuSeJ pyy/xyaKGNF7Lk5PVlEU2b/N9Z7oswMLrJkdBv9vEQOiOWHyOq3/Z7a38POQh2LAt+sI ifVgVcTpOlfBZjDNE5zre7wtx8PlNVn7cVUsZR7NPtDFIbzzzli7cgRMY6oMP1LJMXDH fAg4dJ9SzTck0cRhOKZ7D7hz87/5WTBYRgmkBHEwxc54TpIkAqV8TEZdsh7rbaRLxR2x YAUA== X-Gm-Message-State: ALoCoQnx2kNtXQME7wb7qa2K5ughC3u+JNV59fYyd9bskMMj43vyQoq8ubNKhxxre3z0x0dFdXRY X-Received: by 10.43.134.1 with SMTP id ia1mr13246554icc.75.1433561348619; Fri, 05 Jun 2015 20:29:08 -0700 (PDT) MIME-Version: 1.0 X-Originating-IP: [109.186.38.88] Content-Type: text/plain; charset=UTF-8 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 27 Organization: linux.* mail to news gateway X-Original-Cc: Lina Iyer , "Anna, Suman" , Bjorn Andersson , Andy Gross , "linux-arm-msm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Kumar Gala X-Original-Date: Sat, 6 Jun 2015 06:28:48 +0300 X-Original-Message-ID: X-Original-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> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: aioe.org linux.kernel:1159819 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. -- 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/