diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-09 19:37:59 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-09 19:37:59 -0800 |
commit | 193d2aadc0ff5c687f6f0d5ef1d38c86ab511a14 (patch) | |
tree | 294286e259a08c977e3e71819b2c1d763b13312f /arch/sparc/include | |
parent | 0bce04be442cf4d6e4ba9dac2f0a4c5ee88af5c5 (diff) | |
download | op-kernel-dev-193d2aadc0ff5c687f6f0d5ef1d38c86ab511a14.zip op-kernel-dev-193d2aadc0ff5c687f6f0d5ef1d38c86ab511a14.tar.gz |
sparc: Support atomic64_dec_if_positive properly.
Sparc32 already supported it, as a consequence of using the
generic atomic64 implementation. And the sparc64 implementation
is rather trivial.
This allows us to set ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE for all
of sparc, and avoid the annoying warning from lib/atomic64_test.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/atomic_64.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h index ce35a1c..be56a24 100644 --- a/arch/sparc/include/asm/atomic_64.h +++ b/arch/sparc/include/asm/atomic_64.h @@ -1,7 +1,7 @@ /* atomic.h: Thankfully the V9 is at least reasonable for this * stuff. * - * Copyright (C) 1996, 1997, 2000 David S. Miller (davem@redhat.com) + * Copyright (C) 1996, 1997, 2000, 2012 David S. Miller (davem@redhat.com) */ #ifndef __ARCH_SPARC64_ATOMIC__ @@ -106,6 +106,8 @@ static inline long atomic64_add_unless(atomic64_t *v, long a, long u) #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) +extern long atomic64_dec_if_positive(atomic64_t *v); + /* Atomic operations are already serializing */ #define smp_mb__before_atomic_dec() barrier() #define smp_mb__after_atomic_dec() barrier() |