linux/arch/riscv
Alexandre Ghiti 1d84afaf02
riscv: Fix fully ordered LR/SC xchg[8|16]() implementations
The fully ordered versions of xchg[8|16]() using LR/SC lack the
necessary memory barriers to guarantee the order.

Fix this by matching what is already implemented in the fully ordered
versions of cmpxchg() using LR/SC.

Suggested-by: Andrea Parri <parri.andrea@gmail.com>
Reported-by: Andrea Parri <parri.andrea@gmail.com>
Closes: https://lore.kernel.org/linux-riscv/ZlYbupL5XgzgA0MX@andrea/T/#u
Fixes: a8ed2b7a2c ("riscv/cmpxchg: Implement xchg for variables of size 1 and 2")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20240530145546.394248-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-05-30 09:43:14 -07:00
..
boot riscv: make image compression configurable 2024-05-22 16:12:44 -07:00
configs RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
crypto crypto: riscv - add vector crypto accelerated AES-CBC-CTS 2024-03-20 08:56:11 -07:00
errata RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
include riscv: Fix fully ordered LR/SC xchg[8|16]() implementations 2024-05-30 09:43:14 -07:00
kernel riscv: prevent pt_regs corruption for secondary idle threads 2024-05-30 09:42:51 -07:00
kvm Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
lib riscv: uaccess: Relax the threshold for fast path 2024-05-22 16:12:55 -07:00
mm riscv: mm: accelerate pagefault when badaccess 2024-05-22 16:12:56 -07:00
net Modules changes for v6.10-rc1 2024-05-15 14:05:08 -07:00
purgatory Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools
Kbuild RISC-V: hook new crypto subdir into build-system 2024-01-22 17:55:17 -08:00
Kconfig riscv: enable HAVE_ARCH_HUGE_VMAP for XIP kernel 2024-05-30 09:42:52 -07:00
Kconfig.debug
Kconfig.errata riscv: thead: Rename T-Head PBMT to MAE 2024-04-25 10:22:33 -07:00
Kconfig.socs RISC-V: drop SOC_VIRT for ARCH_VIRT 2024-04-10 11:37:50 +01:00
Makefile RISC-V Patches for the 6.10 Merge Window, Part 2 2024-05-24 10:46:35 -07:00
Makefile.postlink