summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@rivosinc.com>2024-04-08 19:55:03 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2024-04-28 23:50:33 +0200
commit300ce44cbe2924aa83330fc5f24e035665f51b03 (patch)
tree20a5af5c56b6627f38c5b6b6bbd64a3b1b199102 /scripts
parentRISC-V: only flush icache when it has VM_EXEC set (diff)
parentriscv/cmpxchg: Implement xchg for variables of size 1 and 2 (diff)
downloadlinux-300ce44cbe2924aa83330fc5f24e035665f51b03.tar.xz
linux-300ce44cbe2924aa83330fc5f24e035665f51b03.zip
Merge patch series "Rework & improve riscv cmpxchg.h and atomic.h"
Leonardo Bras <leobras@redhat.com> says: While studying riscv's cmpxchg.h file, I got really interested in understanding how RISCV asm implemented the different versions of {cmp,}xchg. When I understood the pattern, it made sense for me to remove the duplications and create macros to make it easier to understand what exactly changes between the versions: Instruction sufixes & barriers. Also, did the same kind of work on atomic.c. After that, I noted both cmpxchg and xchg only accept variables of size 4 and 8, compared to x86 and arm64 which do 1,2,4,8. Now that deduplication is done, it is quite direct to implement them for variable sizes 1 and 2, so I did it. Then Guo Ren already presented me some possible users :) I did compare the generated asm on a test.c that contained usage for every changed function, and could not detect any change on patches 1 + 2 + 3 compared with upstream. Pathes 4 & 5 were compiled-tested, merged with guoren/qspinlock_v11 and booted just fine with qemu -machine virt -append "qspinlock". (tree: https://gitlab.com/LeoBras/linux/-/commits/guo_qspinlock_v11) Latest tests happened based on this tree: https://github.com/guoren83/linux/tree/qspinlock_v12 * b4-shazam-lts: riscv/cmpxchg: Implement xchg for variables of size 1 and 2 riscv/cmpxchg: Implement cmpxchg for variables of size 1 and 2 riscv/atomic.h : Deduplicate arch_atomic.* riscv/cmpxchg: Deduplicate cmpxchg() asm and macros riscv/cmpxchg: Deduplicate xchg() asm functions Link: https://lore.kernel.org/r/20240103163203.72768-2-leobras@redhat.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions