public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lina Iyer <lina.iyer@linaro.org>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Jeffrey Hugo <jhugo@codeaurora.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC v2 0/2] hwspinlock: Introduce raw capability for hwspinlock_device
Date: Thu, 2 Jul 2015 14:30:28 -0600	[thread overview]
Message-ID: <20150702203028.GA4711@linaro.org> (raw)
In-Reply-To: <CAK=Wgbbe9sdV1aEnPN26ujQ3hpSWMuPw901AndpgfSqKCAtong@mail.gmail.com>

On Sat, Jun 27 2015 at 05:25 -0600, Ohad Ben-Cohen wrote:
>Hi Lina,
>
>On Sat, Jun 27, 2015 at 6:05 AM, Lina Iyer <lina.iyer@linaro.org> wrote:
>> Hi Ohad,
>>
>> Any comments?
>
>Sorry, I was under the impression the discussion with Bjorn is still open.
>
I am of the opinion that the platform driver and the framework should
handle this request. This variation is still within the bounds of proper
usage of the hw remote lock. hwspinlock frameowkr imposes a s/w spinlock
around access to every hw remote lock and the current QCOM platform
driver assumes that the value written into the hardware, has to be a
constant.  Both of these are assumptions are the limitations in Linux
and is not a hw remote lock behavior.

I do not agree that the cpuidle driver has to memory map a hwspinlock
region and treat it as a register write, because we dont want to
complicate the hwspinlock platform driver.

>Like Bjorn, I'm not so sure too we want to bind a specific lock to the
>RAW capability since this is not a lock-specific hardware detail.
>
You are right, RAW capability is not lock specific. But we dont want to
impose this on every lock in the bank either. Drivers rely on the
framework's s/w spinlock to ensure that different processes in Linux,
trying to lock the same hwspinlock may correctly acquire. The framework
shall guarantee that the hwspinlock is correctly acquired for regular
usecases (where a constant value is written to the h/w t olock). The RAW
capability assumes that the driver acquiring the RAW lock, knows that
the platform will write a unique value to the h/w and therefore the
correctness of locking is assured by the h/w.

>As far as I can see, the hardware-specific differences (if any) are at
>the vendor level and not at the lock level, therefore it might make
>more sense to add the caps member to hwspinlock_device rather than to
>the hwspinlock struct (Jeffrey commented about this too).
>
Jeff's comment is about my commit text pointing to the wrong structure.
I believe he is fine with the implementation. We debated this idea,
before I came up with this patch.

Thanks,
Lina

  reply	other threads:[~2015-07-02 20:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 16:23 [PATCH RFC v2 0/2] hwspinlock: Introduce raw capability for hwspinlock_device Lina Iyer
2015-06-09 16:23 ` [PATCH RFC v2 1/2] hwspinlock: Introduce raw capability for hwspinlocks Lina Iyer
2015-06-09 16:59   ` Jeffrey Hugo
2015-06-09 16:23 ` [PATCH RFC v2 2/2] hwspinlock: qcom: Lock #7 is special lock, uses dynamic proc_id Lina Iyer
2015-06-10 17:33   ` Bjorn Andersson
2015-06-10 20:13     ` Lina Iyer
2015-06-27  3:05 ` [PATCH RFC v2 0/2] hwspinlock: Introduce raw capability for hwspinlock_device Lina Iyer
2015-06-27 11:25   ` Ohad Ben-Cohen
2015-07-02 20:30     ` Lina Iyer [this message]
2015-07-18 11:31       ` Ohad Ben-Cohen
2015-07-28 21:51         ` Lina Iyer
2015-08-13  6:34           ` Ohad Ben-Cohen
2015-08-13 15:25             ` Andy Gross
2015-08-14 10:52               ` Ohad Ben-Cohen
2015-08-14 13:52                 ` Lina Iyer
2015-08-14 15:24             ` Lina Iyer
2015-09-20 13:02               ` Ohad Ben-Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150702203028.GA4711@linaro.org \
    --to=lina.iyer@linaro.org \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=jhugo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ohad@wizery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox