diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2005-06-23 11:57:15 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:31:31 -0400 |
commit | c4559f67b73d6c34fde0faac5c6c890a2cf3527c (patch) | |
tree | 4063b3a937215684db85cc4f70eabd99cf3b8573 /include/asm-mips/atomic.h | |
parent | 69c75fb458cd81bb29e1d9580469110b00316748 (diff) |
Always use ".set mips3" rather than select between "mips2" or "mips3"
for assembling ll/sc sequences to avoid problems with 64-bit
configurations.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/atomic.h')
-rw-r--r-- | include/asm-mips/atomic.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index 80ea3fbd3ece..6202eb8a14b7 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -62,7 +62,7 @@ static __inline__ void atomic_add(int i, atomic_t * v) | |||
62 | unsigned long temp; | 62 | unsigned long temp; |
63 | 63 | ||
64 | __asm__ __volatile__( | 64 | __asm__ __volatile__( |
65 | " .set mips2 \n" | 65 | " .set mips3 \n" |
66 | "1: ll %0, %1 # atomic_add \n" | 66 | "1: ll %0, %1 # atomic_add \n" |
67 | " addu %0, %2 \n" | 67 | " addu %0, %2 \n" |
68 | " sc %0, %1 \n" | 68 | " sc %0, %1 \n" |
@@ -74,7 +74,7 @@ static __inline__ void atomic_add(int i, atomic_t * v) | |||
74 | unsigned long temp; | 74 | unsigned long temp; |
75 | 75 | ||
76 | __asm__ __volatile__( | 76 | __asm__ __volatile__( |
77 | " .set mips2 \n" | 77 | " .set mips3 \n" |
78 | "1: ll %0, %1 # atomic_add \n" | 78 | "1: ll %0, %1 # atomic_add \n" |
79 | " addu %0, %2 \n" | 79 | " addu %0, %2 \n" |
80 | " sc %0, %1 \n" | 80 | " sc %0, %1 \n" |
@@ -104,7 +104,7 @@ static __inline__ void atomic_sub(int i, atomic_t * v) | |||
104 | unsigned long temp; | 104 | unsigned long temp; |
105 | 105 | ||
106 | __asm__ __volatile__( | 106 | __asm__ __volatile__( |
107 | " .set mips2 \n" | 107 | " .set mips3 \n" |
108 | "1: ll %0, %1 # atomic_sub \n" | 108 | "1: ll %0, %1 # atomic_sub \n" |
109 | " subu %0, %2 \n" | 109 | " subu %0, %2 \n" |
110 | " sc %0, %1 \n" | 110 | " sc %0, %1 \n" |
@@ -116,7 +116,7 @@ static __inline__ void atomic_sub(int i, atomic_t * v) | |||
116 | unsigned long temp; | 116 | unsigned long temp; |
117 | 117 | ||
118 | __asm__ __volatile__( | 118 | __asm__ __volatile__( |
119 | " .set mips2 \n" | 119 | " .set mips3 \n" |
120 | "1: ll %0, %1 # atomic_sub \n" | 120 | "1: ll %0, %1 # atomic_sub \n" |
121 | " subu %0, %2 \n" | 121 | " subu %0, %2 \n" |
122 | " sc %0, %1 \n" | 122 | " sc %0, %1 \n" |
@@ -144,7 +144,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
144 | unsigned long temp; | 144 | unsigned long temp; |
145 | 145 | ||
146 | __asm__ __volatile__( | 146 | __asm__ __volatile__( |
147 | " .set mips2 \n" | 147 | " .set mips3 \n" |
148 | "1: ll %1, %2 # atomic_add_return \n" | 148 | "1: ll %1, %2 # atomic_add_return \n" |
149 | " addu %0, %1, %3 \n" | 149 | " addu %0, %1, %3 \n" |
150 | " sc %0, %2 \n" | 150 | " sc %0, %2 \n" |
@@ -159,7 +159,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
159 | unsigned long temp; | 159 | unsigned long temp; |
160 | 160 | ||
161 | __asm__ __volatile__( | 161 | __asm__ __volatile__( |
162 | " .set mips2 \n" | 162 | " .set mips3 \n" |
163 | "1: ll %1, %2 # atomic_add_return \n" | 163 | "1: ll %1, %2 # atomic_add_return \n" |
164 | " addu %0, %1, %3 \n" | 164 | " addu %0, %1, %3 \n" |
165 | " sc %0, %2 \n" | 165 | " sc %0, %2 \n" |
@@ -191,7 +191,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
191 | unsigned long temp; | 191 | unsigned long temp; |
192 | 192 | ||
193 | __asm__ __volatile__( | 193 | __asm__ __volatile__( |
194 | " .set mips2 \n" | 194 | " .set mips3 \n" |
195 | "1: ll %1, %2 # atomic_sub_return \n" | 195 | "1: ll %1, %2 # atomic_sub_return \n" |
196 | " subu %0, %1, %3 \n" | 196 | " subu %0, %1, %3 \n" |
197 | " sc %0, %2 \n" | 197 | " sc %0, %2 \n" |
@@ -206,7 +206,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
206 | unsigned long temp; | 206 | unsigned long temp; |
207 | 207 | ||
208 | __asm__ __volatile__( | 208 | __asm__ __volatile__( |
209 | " .set mips2 \n" | 209 | " .set mips3 \n" |
210 | "1: ll %1, %2 # atomic_sub_return \n" | 210 | "1: ll %1, %2 # atomic_sub_return \n" |
211 | " subu %0, %1, %3 \n" | 211 | " subu %0, %1, %3 \n" |
212 | " sc %0, %2 \n" | 212 | " sc %0, %2 \n" |
@@ -245,7 +245,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
245 | unsigned long temp; | 245 | unsigned long temp; |
246 | 246 | ||
247 | __asm__ __volatile__( | 247 | __asm__ __volatile__( |
248 | " .set mips2 \n" | 248 | " .set mips3 \n" |
249 | "1: ll %1, %2 # atomic_sub_if_positive\n" | 249 | "1: ll %1, %2 # atomic_sub_if_positive\n" |
250 | " subu %0, %1, %3 \n" | 250 | " subu %0, %1, %3 \n" |
251 | " bltz %0, 1f \n" | 251 | " bltz %0, 1f \n" |
@@ -261,7 +261,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
261 | unsigned long temp; | 261 | unsigned long temp; |
262 | 262 | ||
263 | __asm__ __volatile__( | 263 | __asm__ __volatile__( |
264 | " .set mips2 \n" | 264 | " .set mips3 \n" |
265 | "1: ll %1, %2 # atomic_sub_if_positive\n" | 265 | "1: ll %1, %2 # atomic_sub_if_positive\n" |
266 | " subu %0, %1, %3 \n" | 266 | " subu %0, %1, %3 \n" |
267 | " bltz %0, 1f \n" | 267 | " bltz %0, 1f \n" |