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: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org>
Please register or sign in to comment