locking,arch: Rewrite generic atomic support
authorPeter Zijlstra <peterz@infradead.org>
Wed, 23 Apr 2014 14:12:30 +0000 (16:12 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 14 Aug 2014 10:48:14 +0000 (12:48 +0200)
commit560cb12a4080a48b84da8b96878cafbd193c4d64
treee0b28be89d66e8a01b164b7c6123e918cafcc79c
parentd4608dd5b4ec13855680b89f719d8d4b2da92411
locking,arch: Rewrite generic atomic support

Rewrite generic atomic support to only require cmpxchg(), generate all
other primitives from that.

Furthermore reduce the endless repetition for all these primitives to
a few CPP macros. This way we get more for less lines.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140508135852.940119622@infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/asm-generic/atomic.h
include/asm-generic/atomic64.h
lib/atomic64.c