Searched hist:"1 d84afaf02524d2558e8ca3ca169be2ef720380b" (Results 1 – 1 of 1) sorted by relevance
/linux/arch/riscv/include/asm/ |
H A D | cmpxchg.h | diff 1d84afaf02524d2558e8ca3ca169be2ef720380b Thu May 30 16:55:46 CEST 2024 Alexandre Ghiti <alexghiti@rivosinc.com> 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: a8ed2b7a2c13 ("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>
|