From: peterz@infradead.org (Peter Zijlstra)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm64: barrier: implement wfe-based smp_cond_load_acquire
Date: Thu, 30 Jun 2016 15:10:15 +0200 [thread overview]
Message-ID: <20160630131015.GD30921@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160630130016.GE7962@arm.com>
On Thu, Jun 30, 2016 at 02:00:17PM +0100, Will Deacon wrote:
> On Mon, Jun 27, 2016 at 06:43:54PM +0100, Will Deacon wrote:
> > smp_cond_load_acquire is used to spin on a variable until some
> > expression involving that variable becomes true.
> >
> > On arm64, we can build this using WFE and LDXR, since clearing of the
> > exclusive monitor as a result of the variable being changed by another
> > CPU generates an event, which will wake us up out of WFE.
> >
> > This patch implements smp_cond_load_acquire using LDXR and WFE, which
> > themselves are contained in an internal __cmpwait function.
> >
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> > ---
> >
> > Based on Peter's locking/core branch.
> >
> > v1->v2: Use cmpwait_relaxed
> >
> > arch/arm64/include/asm/barrier.h | 13 ++++++++++
> > arch/arm64/include/asm/cmpxchg.h | 51 ++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 64 insertions(+)
>
> Peter -- could you take this one via locking/core for 4.8, please? I don't
> anticipate any conflicts with the arm64 tree and it relies on your other
> cond-wait patches anyway.
OK, queued it. Thanks!
prev parent reply other threads:[~2016-06-30 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 17:43 [PATCH v2] arm64: barrier: implement wfe-based smp_cond_load_acquire Will Deacon
2016-06-30 13:00 ` Will Deacon
2016-06-30 13:10 ` Peter Zijlstra [this message]
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=20160630131015.GD30921@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).