x86/percpu: Optimize raw_cpu_xchg()
authorPeter Zijlstra <peterz@infradead.org>
Wed, 27 Feb 2019 10:09:56 +0000 (11:09 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 17 Jun 2019 10:43:44 +0000 (12:43 +0200)
commit2234a6d3a28a971182cc91d5679e444516421de0
treebea8d20799cc102fe565c3c1c5ccc69802c7bbf6
parent8dc2d993cf1aea578d947e34ea2d5c6ffd1644e4
x86/percpu: Optimize raw_cpu_xchg()

Since raw_cpu_xchg() doesn't need to be IRQ-safe, like
this_cpu_xchg(), we can use a simple load-store instead of the cmpxchg
loop.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/percpu.h