Back when Will did his qspinlock determinism patches, we were left with one cmpxchg loop on x86 due to the use of atomic_fetch_or(). Will proposed a nifty trick:
http://lkml.kernel.org/r/20180409145409.ga9...@arm.com While that didn't quite work, this series implements that basic idea. Changes since v1: - Adjusted comments in #2, wildea01 - 'Simplified' GEN_*_RMWcc, peterz - Rewrote _the_ patch to use BTS, wildea01