]> git.baikalelectronics.ru Git - kernel.git/commit
csky: atomic: Add custom atomic.h implementation
authorGuo Ren <guoren@linux.alibaba.com>
Wed, 6 Apr 2022 12:47:52 +0000 (20:47 +0800)
committerGuo Ren <guoren@linux.alibaba.com>
Mon, 25 Apr 2022 05:51:42 +0000 (13:51 +0800)
commit5aff8ef3a91530ea645f678cbc95d4eb0993e97d
tree54bdf2974e9db25c8ee81426ead58fda082641cb
parentc20f992cbd524fb7800ab28cb8ce5d40455abd50
csky: atomic: Add custom atomic.h implementation

The generic atomic.h used cmpxchg to implement the atomic
operations, it will cause daul loop to reduce the forward
guarantee. The patch implement csky custom atomic operations with
ldex/stex instructions for the best performance.

Important comment by Rutland:
6ee4a9a8a621 ("arm64: atomics: fix use of acquire + release for
full barrier semantics")

Link: https://lore.kernel.org/linux-riscv/CAJF2gTSAxpAi=LbAdu7jntZRUa=-dJwL0VfmDfBV5MHB=rcZ-w@mail.gmail.com/T/#m27a0f1342995deae49ce1d0e1f2683f8a181d6c3
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
arch/csky/include/asm/atomic.h [new file with mode: 0644]