locking/atomic/x86: Use atomic_try_cmpxchg()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 17 Mar 2017 19:44:45 +0000 (20:44 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 23 Mar 2017 07:54:41 +0000 (08:54 +0100)
commite6790e4b5d5e97dc287f3496dd2cf2dbabdfdb35
tree70bb3495496bb4f41221119cc6c6acd954334457
parentb78c0d471255e99411d6c1b3975df21c3cd9f349
locking/atomic/x86: Use atomic_try_cmpxchg()

Better code generation:

      text           data  bss        name
  10665111        4530096  843776     defconfig-build/vmlinux.3
  10655703        4530096  843776     defconfig-build/vmlinux.4

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/atomic.h
arch/x86/include/asm/atomic64_64.h