mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
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>
This commit is contained in:
parent
ce6365270e
commit
ce0f493240
@ -285,6 +285,7 @@ static inline int atomic_fetch_##op(int i, atomic_t *v) \
|
|||||||
ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3)
|
ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3)
|
||||||
#define atomic_sub(i, v) atomic_add(-(i), (v))
|
#define atomic_sub(i, v) atomic_add(-(i), (v))
|
||||||
#define atomic_sub_return(i, v) atomic_add_return(-(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
|
#undef ATOMIC_OPS
|
||||||
#define ATOMIC_OPS(op, c_op, asm_op) \
|
#define ATOMIC_OPS(op, c_op, asm_op) \
|
||||||
@ -293,6 +294,7 @@ ATOMIC_OPS(add, +=, CTOP_INST_AADD_DI_R2_R2_R3)
|
|||||||
|
|
||||||
ATOMIC_OPS(and, &=, CTOP_INST_AAND_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_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(or, |=, CTOP_INST_AOR_DI_R2_R2_R3)
|
||||||
ATOMIC_OPS(xor, ^=, CTOP_INST_AXOR_DI_R2_R2_R3)
|
ATOMIC_OPS(xor, ^=, CTOP_INST_AXOR_DI_R2_R2_R3)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user