diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/sparc/include/asm/atomic_64.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/sparc/include/asm/atomic_64.h')
-rw-r--r-- | arch/sparc/include/asm/atomic_64.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h index be56a244c9c..9f421df46ae 100644 --- a/arch/sparc/include/asm/atomic_64.h +++ b/arch/sparc/include/asm/atomic_64.h | |||
@@ -1,14 +1,14 @@ | |||
1 | /* atomic.h: Thankfully the V9 is at least reasonable for this | 1 | /* atomic.h: Thankfully the V9 is at least reasonable for this |
2 | * stuff. | 2 | * stuff. |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997, 2000, 2012 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1996, 1997, 2000 David S. Miller (davem@redhat.com) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef __ARCH_SPARC64_ATOMIC__ | 7 | #ifndef __ARCH_SPARC64_ATOMIC__ |
8 | #define __ARCH_SPARC64_ATOMIC__ | 8 | #define __ARCH_SPARC64_ATOMIC__ |
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <asm/cmpxchg.h> | 11 | #include <asm/system.h> |
12 | 12 | ||
13 | #define ATOMIC_INIT(i) { (i) } | 13 | #define ATOMIC_INIT(i) { (i) } |
14 | #define ATOMIC64_INIT(i) { (i) } | 14 | #define ATOMIC64_INIT(i) { (i) } |
@@ -85,6 +85,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) | |||
85 | return c; | 85 | return c; |
86 | } | 86 | } |
87 | 87 | ||
88 | |||
88 | #define atomic64_cmpxchg(v, o, n) \ | 89 | #define atomic64_cmpxchg(v, o, n) \ |
89 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) | 90 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) |
90 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) | 91 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) |
@@ -106,8 +107,6 @@ static inline long atomic64_add_unless(atomic64_t *v, long a, long u) | |||
106 | 107 | ||
107 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) | 108 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) |
108 | 109 | ||
109 | extern long atomic64_dec_if_positive(atomic64_t *v); | ||
110 | |||
111 | /* Atomic operations are already serializing */ | 110 | /* Atomic operations are already serializing */ |
112 | #define smp_mb__before_atomic_dec() barrier() | 111 | #define smp_mb__before_atomic_dec() barrier() |
113 | #define smp_mb__after_atomic_dec() barrier() | 112 | #define smp_mb__after_atomic_dec() barrier() |