aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorGravatar Anton Blanchard <anton@samba.org> 2012-02-29 21:12:16 +0000
committerGravatar Benjamin Herrenschmidt <benh@kernel.crashing.org> 2012-03-07 17:06:08 +1100
commita6cf7ed5119fb22f54584a9f867b638edd3c4384 (patch)
tree5a81f3e6cf92caa6e806e2a5b945406902e63e07 /arch/powerpc/mm
parentatomic: Allow atomic_inc_not_zero to be overridden (diff)
downloadlinux-a6cf7ed5119fb22f54584a9f867b638edd3c4384.tar.gz
linux-a6cf7ed5119fb22f54584a9f867b638edd3c4384.tar.bz2
linux-a6cf7ed5119fb22f54584a9f867b638edd3c4384.zip
powerpc/atomic: Implement atomic*_inc_not_zero
Implement atomic_inc_not_zero and atomic64_inc_not_zero. At the moment we use atomic*_add_unless which requires us to put 0 and 1 constants into registers. We can also avoid a subtract by saving the original value in a second temporary. This removes 3 instructions from fget: - c0000000001b63c0: 39 00 00 00 li r8,0 - c0000000001b63c4: 39 40 00 01 li r10,1 ... - c0000000001b63e8: 7c 0a 00 50 subf r0,r10,r0 Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
0 files changed, 0 insertions, 0 deletions