All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc,dec}
@ 2015-10-07 14:10 ` Will Deacon
  0 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2015-10-07 14:10 UTC (permalink / raw)
  To: linux-arm-kernel, peterz
  Cc: linux-kernel, Will Deacon, Davidlohr Bueso, Thomas Gleixner

Now that the core code supports acquire/release/relaxed versions of
the atomic_inc family, implement only the _relaxed flavours in the ARM
backend so that we get all of the others for free.

Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---

This sits on top of tip/locking/core and it would be great to have it
queued there.

 arch/arm/include/asm/atomic.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 2bf80afb7841..9e10c4567eb4 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -210,8 +210,8 @@ ATOMIC_OP(xor, ^=, eor)
 
 #define atomic_inc_and_test(v)	(atomic_add_return(1, v) == 0)
 #define atomic_dec_and_test(v)	(atomic_sub_return(1, v) == 0)
-#define atomic_inc_return(v)    (atomic_add_return(1, v))
-#define atomic_dec_return(v)    (atomic_sub_return(1, v))
+#define atomic_inc_return_relaxed(v)    (atomic_add_return_relaxed(1, v))
+#define atomic_dec_return_relaxed(v)    (atomic_sub_return_relaxed(1, v))
 #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
 
 #define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
@@ -442,11 +442,11 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u)
 
 #define atomic64_add_negative(a, v)	(atomic64_add_return((a), (v)) < 0)
 #define atomic64_inc(v)			atomic64_add(1LL, (v))
-#define atomic64_inc_return(v)		atomic64_add_return(1LL, (v))
+#define atomic64_inc_return_relaxed(v)	atomic64_add_return_relaxed(1LL, (v))
 #define atomic64_inc_and_test(v)	(atomic64_inc_return(v) == 0)
 #define atomic64_sub_and_test(a, v)	(atomic64_sub_return((a), (v)) == 0)
 #define atomic64_dec(v)			atomic64_sub(1LL, (v))
-#define atomic64_dec_return(v)		atomic64_sub_return(1LL, (v))
+#define atomic64_dec_return_relaxed(v)	atomic64_sub_return_relaxed(1LL, (v))
 #define atomic64_dec_and_test(v)	(atomic64_dec_return((v)) == 0)
 #define atomic64_inc_not_zero(v)	atomic64_add_unless((v), 1LL, 0LL)
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc, dec}
@ 2015-10-07 14:10 ` Will Deacon
  0 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2015-10-07 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the core code supports acquire/release/relaxed versions of
the atomic_inc family, implement only the _relaxed flavours in the ARM
backend so that we get all of the others for free.

Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---

This sits on top of tip/locking/core and it would be great to have it
queued there.

 arch/arm/include/asm/atomic.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 2bf80afb7841..9e10c4567eb4 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -210,8 +210,8 @@ ATOMIC_OP(xor, ^=, eor)
 
 #define atomic_inc_and_test(v)	(atomic_add_return(1, v) == 0)
 #define atomic_dec_and_test(v)	(atomic_sub_return(1, v) == 0)
-#define atomic_inc_return(v)    (atomic_add_return(1, v))
-#define atomic_dec_return(v)    (atomic_sub_return(1, v))
+#define atomic_inc_return_relaxed(v)    (atomic_add_return_relaxed(1, v))
+#define atomic_dec_return_relaxed(v)    (atomic_sub_return_relaxed(1, v))
 #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
 
 #define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
@@ -442,11 +442,11 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u)
 
 #define atomic64_add_negative(a, v)	(atomic64_add_return((a), (v)) < 0)
 #define atomic64_inc(v)			atomic64_add(1LL, (v))
-#define atomic64_inc_return(v)		atomic64_add_return(1LL, (v))
+#define atomic64_inc_return_relaxed(v)	atomic64_add_return_relaxed(1LL, (v))
 #define atomic64_inc_and_test(v)	(atomic64_inc_return(v) == 0)
 #define atomic64_sub_and_test(a, v)	(atomic64_sub_return((a), (v)) == 0)
 #define atomic64_dec(v)			atomic64_sub(1LL, (v))
-#define atomic64_dec_return(v)		atomic64_sub_return(1LL, (v))
+#define atomic64_dec_return_relaxed(v)	atomic64_sub_return_relaxed(1LL, (v))
 #define atomic64_dec_and_test(v)	(atomic64_dec_return((v)) == 0)
 #define atomic64_inc_not_zero(v)	atomic64_add_unless((v), 1LL, 0LL)
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc,dec}
  2015-10-07 14:10 ` [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc, dec} Will Deacon
@ 2015-10-07 14:16   ` Peter Zijlstra
  -1 siblings, 0 replies; 7+ messages in thread
From: Peter Zijlstra @ 2015-10-07 14:16 UTC (permalink / raw)
  To: Will Deacon
  Cc: linux-arm-kernel, linux-kernel, Davidlohr Bueso, Thomas Gleixner

On Wed, Oct 07, 2015 at 03:10:38PM +0100, Will Deacon wrote:
> Now that the core code supports acquire/release/relaxed versions of
> the atomic_inc family, implement only the _relaxed flavours in the ARM
> backend so that we get all of the others for free.
> 
> Cc: Davidlohr Bueso <dbueso@suse.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> ---
> 
> This sits on top of tip/locking/core and it would be great to have it
> queued there.

Thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc,dec}
@ 2015-10-07 14:16   ` Peter Zijlstra
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Zijlstra @ 2015-10-07 14:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 07, 2015 at 03:10:38PM +0100, Will Deacon wrote:
> Now that the core code supports acquire/release/relaxed versions of
> the atomic_inc family, implement only the _relaxed flavours in the ARM
> backend so that we get all of the others for free.
> 
> Cc: Davidlohr Bueso <dbueso@suse.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> ---
> 
> This sits on top of tip/locking/core and it would be great to have it
> queued there.

Thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc,dec}
  2015-10-07 14:10 ` [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc, dec} Will Deacon
@ 2015-10-07 14:36   ` Davidlohr Bueso
  -1 siblings, 0 replies; 7+ messages in thread
From: Davidlohr Bueso @ 2015-10-07 14:36 UTC (permalink / raw)
  To: Will Deacon
  Cc: linux-arm-kernel, peterz, linux-kernel, Davidlohr Bueso, Thomas Gleixner

On Wed, 07 Oct 2015, Will Deacon wrote:

>Now that the core code supports acquire/release/relaxed versions of
>the atomic_inc family, implement only the _relaxed flavours in the ARM
>backend so that we get all of the others for free.
>
>Cc: Davidlohr Bueso <dbueso@suse.de>
>Cc: Peter Zijlstra <peterz@infradead.org>
>Cc: Thomas Gleixner <tglx@linutronix.de>
>Signed-off-by: Will Deacon <will.deacon@arm.com>

Thanks for following up with this!

Acked-by: Davidlohr Bueso <dbueso@suse.de>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc,dec}
@ 2015-10-07 14:36   ` Davidlohr Bueso
  0 siblings, 0 replies; 7+ messages in thread
From: Davidlohr Bueso @ 2015-10-07 14:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 07 Oct 2015, Will Deacon wrote:

>Now that the core code supports acquire/release/relaxed versions of
>the atomic_inc family, implement only the _relaxed flavours in the ARM
>backend so that we get all of the others for free.
>
>Cc: Davidlohr Bueso <dbueso@suse.de>
>Cc: Peter Zijlstra <peterz@infradead.org>
>Cc: Thomas Gleixner <tglx@linutronix.de>
>Signed-off-by: Will Deacon <will.deacon@arm.com>

Thanks for following up with this!

Acked-by: Davidlohr Bueso <dbueso@suse.de>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [tip:locking/core] ARM, locking/atomics: Implement _relaxed variants of atomic[64]_{inc,dec}
  2015-10-07 14:10 ` [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc, dec} Will Deacon
                   ` (2 preceding siblings ...)
  (?)
@ 2015-10-20  9:32 ` tip-bot for Will Deacon
  -1 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Will Deacon @ 2015-10-20  9:32 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: akpm, dbueso, peterz, tglx, will.deacon, mingo, torvalds, hpa,
	linux-kernel, paulmck

Commit-ID:  6e490b0106a2118ee4c37c37847454a5c2dc6e32
Gitweb:     http://git.kernel.org/tip/6e490b0106a2118ee4c37c37847454a5c2dc6e32
Author:     Will Deacon <will.deacon@arm.com>
AuthorDate: Wed, 7 Oct 2015 15:10:38 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 20 Oct 2015 10:17:23 +0200

ARM, locking/atomics: Implement _relaxed variants of atomic[64]_{inc,dec}

Now that the core code supports acquire/release/relaxed versions of
the atomic_inc family, implement only the _relaxed flavours in the ARM
backend so that we get all of the others for free.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1444227038-12533-1-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/arm/include/asm/atomic.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 2bf80af..9e10c45 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -210,8 +210,8 @@ ATOMIC_OP(xor, ^=, eor)
 
 #define atomic_inc_and_test(v)	(atomic_add_return(1, v) == 0)
 #define atomic_dec_and_test(v)	(atomic_sub_return(1, v) == 0)
-#define atomic_inc_return(v)    (atomic_add_return(1, v))
-#define atomic_dec_return(v)    (atomic_sub_return(1, v))
+#define atomic_inc_return_relaxed(v)    (atomic_add_return_relaxed(1, v))
+#define atomic_dec_return_relaxed(v)    (atomic_sub_return_relaxed(1, v))
 #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
 
 #define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
@@ -442,11 +442,11 @@ static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u)
 
 #define atomic64_add_negative(a, v)	(atomic64_add_return((a), (v)) < 0)
 #define atomic64_inc(v)			atomic64_add(1LL, (v))
-#define atomic64_inc_return(v)		atomic64_add_return(1LL, (v))
+#define atomic64_inc_return_relaxed(v)	atomic64_add_return_relaxed(1LL, (v))
 #define atomic64_inc_and_test(v)	(atomic64_inc_return(v) == 0)
 #define atomic64_sub_and_test(a, v)	(atomic64_sub_return((a), (v)) == 0)
 #define atomic64_dec(v)			atomic64_sub(1LL, (v))
-#define atomic64_dec_return(v)		atomic64_sub_return(1LL, (v))
+#define atomic64_dec_return_relaxed(v)	atomic64_sub_return_relaxed(1LL, (v))
 #define atomic64_dec_and_test(v)	(atomic64_dec_return((v)) == 0)
 #define atomic64_inc_not_zero(v)	atomic64_add_unless((v), 1LL, 0LL)
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-20  9:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-07 14:10 [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc,dec} Will Deacon
2015-10-07 14:10 ` [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc, dec} Will Deacon
2015-10-07 14:16 ` [PATCH -tip] ARM: atomics: implement _relaxed variants of atomic[64]_{inc,dec} Peter Zijlstra
2015-10-07 14:16   ` Peter Zijlstra
2015-10-07 14:36 ` Davidlohr Bueso
2015-10-07 14:36   ` Davidlohr Bueso
2015-10-20  9:32 ` [tip:locking/core] ARM, locking/atomics: Implement " tip-bot for Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.