summaryrefslogtreecommitdiff
path: root/arch/csky/boot
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2022-04-13 15:27:52 +0800
committerGuo Ren <guoren@linux.alibaba.com>2022-04-25 13:51:43 +0800
commitc5acdf12cc24d34ea3f9426472dcb3f5d581b1e5 (patch)
treef122a87ac51348ecdf351f70664582c6462e5393 /arch/csky/boot
parent6b160e0513e9f0b0c0b7ff4d5b964822d1750ce9 (diff)
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>
Diffstat (limited to 'arch/csky/boot')
0 files changed, 0 insertions, 0 deletions