mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
riscv/futex: Optimize atomic cmpxchg
Remove redundant release/acquire barriers, optimizing the lr/sc sequence to provide conditional RCsc synchronization, per the RVWMO. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed-by: Andrea Parri <parri.andrea@gmail.com> Link: https://lore.kernel.org/r/20241113183321.491113-1-dave@stgolabs.net Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
0207244ea0
commit
9d0593da94
|
|
@ -85,7 +85,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
|||
|
||||
__enable_user_access();
|
||||
__asm__ __volatile__ (
|
||||
"1: lr.w.aqrl %[v],%[u] \n"
|
||||
"1: lr.w %[v],%[u] \n"
|
||||
" bne %[v],%z[ov],3f \n"
|
||||
"2: sc.w.aqrl %[t],%z[nv],%[u] \n"
|
||||
" bnez %[t],1b \n"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user