]> git.baikalelectronics.ru Git - kernel.git/commit
openrisc: add atomic bitops
authorStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Mon, 12 May 2014 11:08:26 +0000 (14:08 +0300)
committerStafford Horne <shorne@gmail.com>
Fri, 24 Feb 2017 19:12:38 +0000 (04:12 +0900)
commitd4871038ffe8338a7ef78be722e74b4404008486
tree502f8f067c7cc7ffcdd9042d404dc92e62b78f3c
parenta95e54c12b8d3d4e1b207e3e09841fddab16c98a
openrisc: add atomic bitops

This utilize the load-link/store-conditional l.lwa and l.swa
instructions to implement the atomic bitops.
When those 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, implement
test_and_change_bit]
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/include/asm/bitops.h
arch/openrisc/include/asm/bitops/atomic.h [new file with mode: 0644]