Peter Zijlstra
f7d11e93ee
locking,arch,arc: Fold atomic_ops
...
Many of the atomic op implementations are the same except for one
instruction; fold the lot into a few CPP macros and reduce LoC.
This also prepares for easy addition of new ops.
Signed-off-by: Peter Zijlstra <peterz@infradead.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Vineet Gupta <vgupta@synopsys.com >
Link: http://lkml.kernel.org/r/20140508135851.886055622@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2014-08-14 12:48:03 +02:00
Peter Zijlstra
d594ffa94b
arch,arc: Convert smp_mb__*()
...
The arc mb() implementation is a compiler barrier(), therefore it all
doesn't matter one way or the other. Simply remove the existing
definitions and use whatever is generated by the defaults.
Signed-off-by: Peter Zijlstra <peterz@infradead.org >
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Link: http://lkml.kernel.org/n/tip-ua48a59wri3ybz1rz8i7uvbr@git.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Vineet Gupta <vgupta@synopsys.com >
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2014-04-18 11:40:31 +02:00
Peter Zijlstra
1de7da377b
arch: Move smp_mb__{before,after}_atomic_{inc,dec}.h into asm/atomic.h
...
Move the barriers functions that depend on the atomic implementation
into the atomic implementation.
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Signed-off-by: Peter Zijlstra <peterz@infradead.org >
Acked-by: Vineet Gupta <vgupta@synopsys.com > [for arch/arc bits]
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Link: http://lkml.kernel.org/r/20131213150640.786183683@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2014-01-12 10:37:14 +01:00
Vineet Gupta
14e968bad7
ARC: Atomic/bitops/cmpxchg/barriers
...
This covers the UP / SMP (with no hardware assist for atomic r-m-w) as
well as ARC700 LLOCK/SCOND insns based.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com >
2013-02-11 20:00:30 +05:30