linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ohad Ben-Cohen <ohad@wizery.com>
To: Lina Iyer <lina.iyer@linaro.org>
Cc: "Anna, Suman" <s-anna@ti.com>,
	Bjorn Andersson <Bjorn.Andersson@sonymobile.com>,
	Andy Gross <agross@codeaurora.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Jeffrey Hugo <jhugo@codeaurora.org>
Subject: Re: [PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock
Date: Fri, 5 Jun 2015 04:09:54 +0300	[thread overview]
Message-ID: <CAK=WgbbX5dZ7=WzMr3xGVVP1vBPj_aboLnPOZZsHGi+o-Y2_Cg@mail.gmail.com> (raw)
In-Reply-To: <20150526203634.GL23206@linaro.org>

On Tue, May 26, 2015 at 11:36 PM, Lina Iyer <lina.iyer@linaro.org> wrote:
>> Just to make sure I understand, is this how your scenario is solved?
>>
>> - c1 goes down
>> - c0 goes down, carries information about shared resources
>> - c1 takes HWLOCK and calls into SCM, stuck handling FIQs
>> - c0 wants to call into SCM but is waiting spinning on HWLOCK
>> - c1 completes handling FIQs, goes idle, HWLOCK is released by secure monitor
>> - c0 takes HWLOCK, calls into SCM, shared resources handled correctly,
>>
>> HWLOCK in this example is a single shared hwspinlock accessible by c0,
>> c1 and secure monitor.
>>
> That is correct.

Ok, thanks.

If we adopt the proposed approach in your patch, I'm thinking maybe we
should restrict it only to hardware implementations that explicitly
allow it, using some hardware capability flag published by the
hwspinlock driver.

In OMAP, e.g., it is prohibited to spin on this hwlock for a long
period of time, so such a hw cap flag would allow you guys to enable
this behaviour specifically for your driver.

What do you think?

Thanks,
Ohad.

  reply	other threads:[~2015-06-05  1:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01 17:07 [PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock Lina Iyer
2015-05-09  9:25 ` Ohad Ben-Cohen
2015-05-11 14:46   ` Lina Iyer
2015-05-16  9:03     ` Ohad Ben-Cohen
2015-05-18 15:03       ` Lina Iyer
2015-05-19 20:13         ` Andy Gross
2015-05-20 22:02           ` Lina Iyer
2015-05-23  7:35         ` Ohad Ben-Cohen
2015-05-26 20:36           ` Lina Iyer
2015-06-05  1:09             ` Ohad Ben-Cohen [this message]
2015-06-05 23:50               ` Jeffrey Hugo
2015-06-06  3:28                 ` 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='CAK=WgbbX5dZ7=WzMr3xGVVP1vBPj_aboLnPOZZsHGi+o-Y2_Cg@mail.gmail.com' \
    --to=ohad@wizery.com \
    --cc=Bjorn.Andersson@sonymobile.com \
    --cc=agross@codeaurora.org \
    --cc=galak@codeaurora.org \
    --cc=jhugo@codeaurora.org \
    --cc=lina.iyer@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s-anna@ti.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;
as well as URLs for NNTP newsgroup(s).