openrisc: add optimized atomic operations
authorStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Tue, 13 May 2014 19:30:56 +0000 (22:30 +0300)
committerStafford Horne <shorne@gmail.com>
Fri, 24 Feb 2017 19:14:06 +0000 (04:14 +0900)
commitbc19598f1dde267e5214e386b97bb647973275db
treefb35f0097281aa51ce3b629342f4a4287693a7de
parent11595172537788f0007bfc16590aab18f2b9c40f
openrisc: add optimized atomic operations

Using the l.lwa and l.swa atomic instruction pair.
Most openrisc processor cores provide these instructions now. If the
instructions are 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: expand to implement all ops suggested by Peter
Zijlstra https://lkml.org/lkml/2017/2/20/317]
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/include/asm/Kbuild
arch/openrisc/include/asm/atomic.h [new file with mode: 0644]
include/asm-generic/atomic.h