public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, waiman.long@hpe.com,
	mingo@redhat.com, paulmck@linux.vnet.ibm.com,
	boqun.feng@gmail.com, torvalds@linux-foundation.org,
	dave@stgolabs.net
Subject: Re: [RFC][PATCH 3/3] locking,arm64: Introduce cmpwait()
Date: Tue, 26 Apr 2016 18:15:43 +0100	[thread overview]
Message-ID: <20160426171543.GG1793@arm.com> (raw)
In-Reply-To: <20160426163344.GE1793@arm.com>

On Tue, Apr 26, 2016 at 05:33:44PM +0100, Will Deacon wrote:
> From 5aa5750d5eeb6e3a42f5547f094dc803f89793bb Mon Sep 17 00:00:00 2001
> From: Will Deacon <will.deacon@arm.com>
> Date: Tue, 26 Apr 2016 17:31:53 +0100
> Subject: [PATCH] fixup! locking,arm64: Introduce cmpwait()
> 
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> ---
>  arch/arm64/include/asm/cmpxchg.h | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h
> index cd7bff6ddedc..9b7113a3f0d7 100644
> --- a/arch/arm64/include/asm/cmpxchg.h
> +++ b/arch/arm64/include/asm/cmpxchg.h
> @@ -225,18 +225,19 @@ __CMPXCHG_GEN(_mb)
>  })
>  
>  #define __CMPWAIT_GEN(w, sz, name)					\
> -void __cmpwait_case_##name(volatile void *ptr, unsigned long val)	\
> +static inline void __cmpwait_case_##name(volatile void *ptr,		\
> +					 unsigned long val)		\
>  {									\
>  	unsigned long tmp;						\
>  									\
>  	asm volatile(							\
>  	"	ldxr" #sz "\t%" #w "[tmp], %[v]\n"			\
>  	"	eor	%" #w "[tmp], %" #w "[tmp], %" #w "[val]\n"	\
> -	"	cbnz	%" #w "[tmp], 1f\n"				\
> +	"	cbz	%" #w "[tmp], 1f\n"				\

Actually, you're right with cbnz. I only noticed when I came to implement
my own version of smp_cond_load_acquire. *sigh*

I have fixups applied locally, so maybe the best thing is for me to send
you an arm64 series on top of whatever you post next?

Will

  reply	other threads:[~2016-04-26 17:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 12:22 [RFC][PATCH 0/3] smp_cond_load_acquire + cmpwait Peter Zijlstra
2016-04-04 12:22 ` [RFC][PATCH 1/3] locking: Replace smp_cond_acquire with smp_cond_load_acquire Peter Zijlstra
2016-04-04 18:20   ` Waiman Long
2016-04-04 12:22 ` [RFC][PATCH 2/3] locking/qrwlock: Use smp_cond_load_acquire() Peter Zijlstra
2016-04-12  4:58   ` Davidlohr Bueso
2016-04-12 16:45     ` Waiman Long
2016-04-04 12:22 ` [RFC][PATCH 3/3] locking,arm64: Introduce cmpwait() Peter Zijlstra
2016-04-04 13:12   ` Peter Zijlstra
2016-04-12 16:59   ` Will Deacon
2016-04-13 12:52     ` Peter Zijlstra
2016-04-26 16:33       ` Will Deacon
2016-04-26 17:15         ` Will Deacon [this message]
2016-04-26 20:25           ` Peter Zijlstra
2016-04-22 16:08     ` Boqun Feng
2016-04-22 16:53       ` Will Deacon
2016-04-23  4:02         ` Boqun Feng
2016-04-23  2:37       ` Peter Zijlstra
2016-04-23  3:40         ` Boqun Feng

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=20160426171543.GG1793@arm.com \
    --to=will.deacon@arm.com \
    --cc=boqun.feng@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    --cc=waiman.long@hpe.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