Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv: atomic: Using ARCH_ATOMIC in asm/atomic.h
The linux/atomic-arch-fallback.h has been there for a while, but only x86 & arm64 support it. Let's make riscv follow the linux/arch/* development trendy and make the codes more readable and maintainable. This patch also cleanup some codes: - Add atomic_andnot_* operation - Using amoswap.w.rl & amoswap.w.aq instructions in xchg - Remove cmpxchg_acquire/release unnecessary optimization Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Link: https://lore.kernel.org/linux-riscv/CAK8P3a0FG3cpqBNUP7kXj3713cMUqV1WcEh-vcRnGKM00WXqxw@mail.gmail.com/ Cc: Arnd Bergmann <arnd@arndb.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Anup Patel <anup@brainfault.org> Cc: Palmer Dabbelt <palmerdabbelt@google.com>
- Loading branch information
Showing
2 changed files
with
99 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.