diff options
author | Noam Camus <noamca@mellanox.com> | 2016-09-19 01:34:40 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-09-30 17:48:18 -0400 |
commit | ce0f493240ad356bb18b7f3637d1705fc8fc5712 (patch) | |
tree | ecf98f4b1b730d47d651a7b5dc44e63b57efcb8e | |
parent | ce6365270ecd1216b48fb1440978e454ae0144de (diff) |
ARC: [plat-eznps] add missing atomic_fetch_xxx operations
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>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | 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 d0e222e3776b..b65930a49589 100644 --- a/arch/arc/include/asm/atomic.h +++ b/arch/arc/include/asm/atomic.h | |||
@@ -285,6 +285,7 @@ static inline int atomic_fetch_##op(int i, atomic_t *v) \ | |||
285 | ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3) | 285 | ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3) |
286 | #define atomic_sub(i, v) atomic_add(-(i), (v)) | 286 | #define atomic_sub(i, v) atomic_add(-(i), (v)) |
287 | #define atomic_sub_return(i, v) atomic_add_return(-(i), (v)) | 287 | #define atomic_sub_return(i, v) atomic_add_return(-(i), (v)) |
288 | #define atomic_fetch_sub(i, v) atomic_fetch_add(-(i), (v)) | ||
288 | 289 | ||
289 | #undef ATOMIC_OPS | 290 | #undef ATOMIC_OPS |
290 | #define ATOMIC_OPS(op, c_op, asm_op) \ | 291 | #define ATOMIC_OPS(op, c_op, asm_op) \ |
@@ -293,6 +294,7 @@ ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3) | |||
293 | 294 | ||
294 | ATOMIC_OPS(and, &=, CTOP_INST_AAND_DI_R2_R2_R3) | 295 | ATOMIC_OPS(and, &=, CTOP_INST_AAND_DI_R2_R2_R3) |
295 | #define atomic_andnot(mask, v) atomic_and(~(mask), (v)) | 296 | #define atomic_andnot(mask, v) atomic_and(~(mask), (v)) |
297 | #define atomic_fetch_andnot(mask, v) atomic_fetch_and(~(mask), (v)) | ||
296 | ATOMIC_OPS(or, |=, CTOP_INST_AOR_DI_R2_R2_R3) | 298 | ATOMIC_OPS(or, |=, CTOP_INST_AOR_DI_R2_R2_R3) |
297 | ATOMIC_OPS(xor, ^=, CTOP_INST_AXOR_DI_R2_R2_R3) | 299 | ATOMIC_OPS(xor, ^=, CTOP_INST_AXOR_DI_R2_R2_R3) |
298 | 300 | ||