linux/arch/csky/include
Guo Ren c5acdf12cc csky: atomic: Add conditional atomic operations' optimization
Add conditional atomic operations' optimization:
 - arch_atomic_fetch_add_unless
 - arch_atomic_inc_unless_negative
 - arch_atomic_dec_unless_positive
 - arch_atomic_dec_if_positive

Comments by Boqun:

FWIW, you probably need to make sure that a barrier instruction inside
an lr/sc loop is a good thing. IIUC, the execution time of a barrier
instruction is determined by the status of store buffers and invalidate
queues (and probably other stuffs), so it may increase the execution
time of the lr/sc loop, and make it unlikely to succeed. But this really
depends on how the arch executes these instructions.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
2022-04-25 13:51:43 +08:00
..
asm csky: atomic: Add conditional atomic operations' optimization 2022-04-25 13:51:43 +08:00
uapi/asm csky: Fixup compile error 2021-02-27 22:04:14 +08:00