[PATCH v2 4/4] x86/atomic: Fix smp_mb__{before,after}_atomic()

2019-06-13 Thread Peter Zijlstra
Recent probing at the Linux Kernel Memory Model uncovered a 'surprise'. Strongly ordered architectures where the atomic RmW primitive implies full memory ordering and smp_mb__{before,after}_atomic() are a simple barrier() (such as x86) fail for: *x = 1; atomic_inc(u); smp_m

Re: [PATCH v2 4/4] x86/atomic: Fix smp_mb__{before,after}_atomic()

2019-06-13 Thread Will Deacon
On Thu, Jun 13, 2019 at 03:43:21PM +0200, Peter Zijlstra wrote: > Recent probing at the Linux Kernel Memory Model uncovered a > 'surprise'. Strongly ordered architectures where the atomic RmW > primitive implies full memory ordering and > smp_mb__{before,after}_atomic() are a simple barrier() (such