linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARC: [plat-eznps] add missing atomic_fetch_xxx operations
@ 2016-09-19  5:34 Noam Camus
  2016-09-19 17:08 ` Vineet Gupta
  0 siblings, 1 reply; 2+ messages in thread
From: Noam Camus @ 2016-09-19  5:34 UTC (permalink / raw)
  To: vgupta; +Cc: peterz, mingo, linux-snps-arc, linux-kernel, Noam Camus

From: Noam Camus <noamca@mellanox.com>

Build brekeage since last changes to generic atomic operations.
Added couple of missing macros which are now mandatory

Signed-off-by: Noam Camus <noamca@mellanox.com>
---
 arch/arc/include/asm/atomic.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
index 4e3c1b6..4f732bf 100644
--- a/arch/arc/include/asm/atomic.h
+++ b/arch/arc/include/asm/atomic.h
@@ -284,6 +284,7 @@ static inline int atomic_fetch_##op(int i, atomic_t *v)			\
 ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3)
 #define atomic_sub(i, v) atomic_add(-(i), (v))
 #define atomic_sub_return(i, v) atomic_add_return(-(i), (v))
+#define atomic_fetch_sub(i, v) atomic_fetch_add(-(i), (v))
 
 #undef ATOMIC_OPS
 #define ATOMIC_OPS(op, c_op, asm_op)					\
@@ -292,6 +293,7 @@ ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3)
 
 ATOMIC_OPS(and, &=, CTOP_INST_AAND_DI_R2_R2_R3)
 #define atomic_andnot(mask, v) atomic_and(~(mask), (v))
+#define atomic_fetch_andnot(mask, v) atomic_fetch_and(~(mask), (v))
 ATOMIC_OPS(or, |=, CTOP_INST_AOR_DI_R2_R2_R3)
 ATOMIC_OPS(xor, ^=, CTOP_INST_AXOR_DI_R2_R2_R3)
 
-- 
1.7.1

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

* Re: [PATCH] ARC: [plat-eznps] add missing atomic_fetch_xxx operations
  2016-09-19  5:34 [PATCH] ARC: [plat-eznps] add missing atomic_fetch_xxx operations Noam Camus
@ 2016-09-19 17:08 ` Vineet Gupta
  0 siblings, 0 replies; 2+ messages in thread
From: Vineet Gupta @ 2016-09-19 17:08 UTC (permalink / raw)
  To: Noam Camus; +Cc: peterz, mingo, linux-snps-arc, linux-kernel

On 09/18/2016 10:34 PM, Noam Camus wrote:
> From: Noam Camus <noamca@mellanox.com>
>
> Build brekeage since last changes to generic atomic operations.
> Added couple of missing macros which are now mandatory
>
> Signed-off-by: Noam Camus <noamca@mellanox.com>

Added to for-next !

Thx,
-Vineet



> ---
>  arch/arc/include/asm/atomic.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
> index 4e3c1b6..4f732bf 100644
> --- a/arch/arc/include/asm/atomic.h
> +++ b/arch/arc/include/asm/atomic.h
> @@ -284,6 +284,7 @@ static inline int atomic_fetch_##op(int i, atomic_t *v)			\
>  ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3)
>  #define atomic_sub(i, v) atomic_add(-(i), (v))
>  #define atomic_sub_return(i, v) atomic_add_return(-(i), (v))
> +#define atomic_fetch_sub(i, v) atomic_fetch_add(-(i), (v))
>  
>  #undef ATOMIC_OPS
>  #define ATOMIC_OPS(op, c_op, asm_op)					\
> @@ -292,6 +293,7 @@ ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3)
>  
>  ATOMIC_OPS(and, &=, CTOP_INST_AAND_DI_R2_R2_R3)
>  #define atomic_andnot(mask, v) atomic_and(~(mask), (v))
> +#define atomic_fetch_andnot(mask, v) atomic_fetch_and(~(mask), (v))
>  ATOMIC_OPS(or, |=, CTOP_INST_AOR_DI_R2_R2_R3)
>  ATOMIC_OPS(xor, ^=, CTOP_INST_AXOR_DI_R2_R2_R3)
>  

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

end of thread, other threads:[~2016-09-19 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19  5:34 [PATCH] ARC: [plat-eznps] add missing atomic_fetch_xxx operations Noam Camus
2016-09-19 17:08 ` Vineet Gupta

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).