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)
commit5692e4d11cf5b51045a41daf295626c7fcbb698a
treec1c26e0633e3a71ecdd09be0569b19452e6141c2
parenteddf0d5b31dda679a98f3e5615a510b8f065cb5d
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