Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-30 Thread Mark Rutland
On Thu, Mar 30, 2017 at 08:43:39AM +0200, Ingo Molnar wrote: > > * Mark Rutland wrote: > > > With some minimal CPP, it can be a lot more manageable: > > > > > > #define INSTR_ATOMIC_XCHG(order)\ > > static __always_inline int atomic_xchg##order(atomic_t

Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-29 Thread Ingo Molnar
* Mark Rutland wrote: > With some minimal CPP, it can be a lot more manageable: > > > #define INSTR_ATOMIC_XCHG(order) \ > static __always_inline int atomic_xchg##order(atomic_t *v, int i) \ > {

Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-29 Thread Mark Rutland
Hi, 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. I had a quick look at what it would take to have arm64 use this, and I have a couple of thoughts. > +static __always_inline

Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-29 Thread Mark Rutland
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/atomi

Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-29 Thread Dmitry Vyukov
On Tue, Mar 28, 2017 at 11:35 PM, 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? Onl

Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-28 Thread Matthew Wilcox
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?

[PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-28 Thread Dmitry Vyukov
The new header allows to wrap per-arch atomic operations and add common functionality to all of them. Signed-off-by: Dmitry Vyukov Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Ingo Molnar Cc: kasan-...@googlegroups.com Cc: linux...@kvack.org