]> git.baikalelectronics.ru Git - kernel.git/commit
s390/atomic: optimize atomic_add() for constant values
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 16 Sep 2013 08:44:54 +0000 (10:44 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 24 Oct 2013 15:16:51 +0000 (17:16 +0200)
commitd3a5dd557326f5f573c9c6e0295ac8e589e4c96e
treec1c26e0633e3a71ecdd09be0569b19452e6141c2
parente68a6c4fffc7c4d8102e0e9413a485194c8b50fb
s390/atomic: optimize atomic_add() for constant values

If the interlocked-access facility 1 is available we can use the asi
and agsi instructions for interlocked updates if the to be added
value is a contanst and small (in the range of -128..127).
asi and agsi do not not return the old or new value, therefore these
instructions can only be used for atomic_(add|sub|inc|dec)[64].

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/atomic.h