On Tue, Mar 28, 2017 at 02:35:13PM -0700, Matthew Wilcox wrote: > On Tue, Mar 28, 2017 at 06:15:41PM +0200, Dmitry Vyukov wrote: > > The new header allows to wrap per-arch atomic operations > > and add common functionality to all of them. > > Why a new header instead of putting this in linux/atomic.h?
The idea was that doing it this way allowed architectures to switch over to the arch_* naming without a flag day. Currently this only matters for KASAN, which is only supported by a couple of architectures (arm64, x86). I seem to recall that there was an issue that prevented us from solving this with ifdeffery early in linux/atomic.h like: #ifdef arch_op #define op(...) ({ \ kasna_whatever(...) \ arch_op(...) \ }) #endif ... but I can't recall specifically what it was. Thanks, Mark.