]> asedeno.scripts.mit.edu Git - linux.git/commit
openrisc: add cmpxchg and xchg implementations
authorStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Tue, 13 May 2014 15:01:21 +0000 (18:01 +0300)
committerStafford Horne <shorne@gmail.com>
Fri, 24 Feb 2017 19:14:00 +0000 (04:14 +0900)
commit11595172537788f0007bfc16590aab18f2b9c40f
treef1db0dec55a0de2185628d49efdbcbf3297cd840
parent0e9f9fd20ce931cc2cf0519c56ae33fc74d656ad
openrisc: add cmpxchg and xchg implementations

Optimized version that make use of the l.lwa and l.swa atomic instruction
pair.
Most openrisc cores provide these instructions now, if not available
emulation is provided.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
[shorne@gmail.com: remove OPENRISC_HAVE_INST_LWA_SWA config suggesed by
Alan Cox https://lkml.org/lkml/2014/7/23/666]
[shorne@gmail.com: fixed unused calculated value compiler warning in
define cmpxchg]
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/include/asm/Kbuild
arch/openrisc/include/asm/cmpxchg.h [new file with mode: 0644]