Skip to content
Commit ce91fa27 authored by Guo Ren's avatar Guo Ren
Browse files

riscv: cmpxchg: Add xchg_small & cmpxchg_small support



The pvqspinlock needs additional sub-word atomic operations. Here
is the list:
 - xchg8  (RCsc)
 - xchg16 (Relaxed)
 - cmpxchg8/16_relaxed
 - cmpxchg8/16_release (Rcpc)
 - cmpxchg8_acquire (RCpc)
 - cmpxchg8 (RCsc)

Although paravirt qspinlock doesn't have the native_qspinlock
fairness, giving a strong forward progress guarantee to these
atomic semantics could prevent unnecessary tries, which would
cause cache line bouncing.

Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
parent f3d049e4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment