diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 16:26:18 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 16:26:18 -0500 |
| commit | ef1a8de8ea004a689b2aa9f5cefcba2b1a0262f2 (patch) | |
| tree | 14324fad5e33c50c7d00646b7f6d2524943e7726 /arch/powerpc/include/asm/atomic.h | |
| parent | 1c32fd0c5ac1ccbdc37a1a392a5d75cbe059b401 (diff) | |
| parent | 3d98ffbffb16f2a1569b83cb78db0b5100e6c937 (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (88 commits)
powerpc: Fix lwsync feature fixup vs. modules on 64-bit
powerpc: Convert pmc_owner_lock to raw_spinlock
powerpc: Convert die.lock to raw_spinlock
powerpc: Convert tlbivax_lock to raw_spinlock
powerpc: Convert mpic locks to raw_spinlock
powerpc: Convert pmac_pic_lock to raw_spinlock
powerpc: Convert big_irq_lock to raw_spinlock
powerpc: Convert feature_lock to raw_spinlock
powerpc: Convert i8259_lock to raw_spinlock
powerpc: Convert beat_htab_lock to raw_spinlock
powerpc: Convert confirm_error_lock to raw_spinlock
powerpc: Convert ipic_lock to raw_spinlock
powerpc: Convert native_tlbie_lock to raw_spinlock
powerpc: Convert beatic_irq_mask_lock to raw_spinlock
powerpc: Convert nv_lock to raw_spinlock
powerpc: Convert context_lock to raw_spinlock
powerpc/85xx: Add NOR, LEDs and PIB support for MPC8568E-MDS boards
powerpc/86xx: Enable VME driver on the GE SBC610
powerpc/86xx: Enable VME driver on the GE PPC9A
powerpc/86xx: Add MSI section to GE PPC9A DTS
...
Diffstat (limited to 'arch/powerpc/include/asm/atomic.h')
| -rw-r--r-- | arch/powerpc/include/asm/atomic.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h index 4012483b1899..b8f152ece025 100644 --- a/arch/powerpc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h | |||
| @@ -49,13 +49,13 @@ static __inline__ int atomic_add_return(int a, atomic_t *v) | |||
| 49 | int t; | 49 | int t; |
| 50 | 50 | ||
| 51 | __asm__ __volatile__( | 51 | __asm__ __volatile__( |
| 52 | LWSYNC_ON_SMP | 52 | PPC_RELEASE_BARRIER |
| 53 | "1: lwarx %0,0,%2 # atomic_add_return\n\ | 53 | "1: lwarx %0,0,%2 # atomic_add_return\n\ |
| 54 | add %0,%1,%0\n" | 54 | add %0,%1,%0\n" |
| 55 | PPC405_ERR77(0,%2) | 55 | PPC405_ERR77(0,%2) |
| 56 | " stwcx. %0,0,%2 \n\ | 56 | " stwcx. %0,0,%2 \n\ |
| 57 | bne- 1b" | 57 | bne- 1b" |
| 58 | ISYNC_ON_SMP | 58 | PPC_ACQUIRE_BARRIER |
| 59 | : "=&r" (t) | 59 | : "=&r" (t) |
| 60 | : "r" (a), "r" (&v->counter) | 60 | : "r" (a), "r" (&v->counter) |
| 61 | : "cc", "memory"); | 61 | : "cc", "memory"); |
| @@ -85,13 +85,13 @@ static __inline__ int atomic_sub_return(int a, atomic_t *v) | |||
| 85 | int t; | 85 | int t; |
| 86 | 86 | ||
| 87 | __asm__ __volatile__( | 87 | __asm__ __volatile__( |
| 88 | LWSYNC_ON_SMP | 88 | PPC_RELEASE_BARRIER |
| 89 | "1: lwarx %0,0,%2 # atomic_sub_return\n\ | 89 | "1: lwarx %0,0,%2 # atomic_sub_return\n\ |
| 90 | subf %0,%1,%0\n" | 90 | subf %0,%1,%0\n" |
| 91 | PPC405_ERR77(0,%2) | 91 | PPC405_ERR77(0,%2) |
| 92 | " stwcx. %0,0,%2 \n\ | 92 | " stwcx. %0,0,%2 \n\ |
| 93 | bne- 1b" | 93 | bne- 1b" |
| 94 | ISYNC_ON_SMP | 94 | PPC_ACQUIRE_BARRIER |
| 95 | : "=&r" (t) | 95 | : "=&r" (t) |
| 96 | : "r" (a), "r" (&v->counter) | 96 | : "r" (a), "r" (&v->counter) |
| 97 | : "cc", "memory"); | 97 | : "cc", "memory"); |
| @@ -119,13 +119,13 @@ static __inline__ int atomic_inc_return(atomic_t *v) | |||
| 119 | int t; | 119 | int t; |
| 120 | 120 | ||
| 121 | __asm__ __volatile__( | 121 | __asm__ __volatile__( |
| 122 | LWSYNC_ON_SMP | 122 | PPC_RELEASE_BARRIER |
| 123 | "1: lwarx %0,0,%1 # atomic_inc_return\n\ | 123 | "1: lwarx %0,0,%1 # atomic_inc_return\n\ |
| 124 | addic %0,%0,1\n" | 124 | addic %0,%0,1\n" |
| 125 | PPC405_ERR77(0,%1) | 125 | PPC405_ERR77(0,%1) |
| 126 | " stwcx. %0,0,%1 \n\ | 126 | " stwcx. %0,0,%1 \n\ |
| 127 | bne- 1b" | 127 | bne- 1b" |
| 128 | ISYNC_ON_SMP | 128 | PPC_ACQUIRE_BARRIER |
| 129 | : "=&r" (t) | 129 | : "=&r" (t) |
| 130 | : "r" (&v->counter) | 130 | : "r" (&v->counter) |
| 131 | : "cc", "xer", "memory"); | 131 | : "cc", "xer", "memory"); |
| @@ -163,13 +163,13 @@ static __inline__ int atomic_dec_return(atomic_t *v) | |||
| 163 | int t; | 163 | int t; |
| 164 | 164 | ||
| 165 | __asm__ __volatile__( | 165 | __asm__ __volatile__( |
| 166 | LWSYNC_ON_SMP | 166 | PPC_RELEASE_BARRIER |
| 167 | "1: lwarx %0,0,%1 # atomic_dec_return\n\ | 167 | "1: lwarx %0,0,%1 # atomic_dec_return\n\ |
| 168 | addic %0,%0,-1\n" | 168 | addic %0,%0,-1\n" |
| 169 | PPC405_ERR77(0,%1) | 169 | PPC405_ERR77(0,%1) |
| 170 | " stwcx. %0,0,%1\n\ | 170 | " stwcx. %0,0,%1\n\ |
| 171 | bne- 1b" | 171 | bne- 1b" |
| 172 | ISYNC_ON_SMP | 172 | PPC_ACQUIRE_BARRIER |
| 173 | : "=&r" (t) | 173 | : "=&r" (t) |
| 174 | : "r" (&v->counter) | 174 | : "r" (&v->counter) |
| 175 | : "cc", "xer", "memory"); | 175 | : "cc", "xer", "memory"); |
| @@ -194,7 +194,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
| 194 | int t; | 194 | int t; |
| 195 | 195 | ||
| 196 | __asm__ __volatile__ ( | 196 | __asm__ __volatile__ ( |
| 197 | LWSYNC_ON_SMP | 197 | PPC_RELEASE_BARRIER |
| 198 | "1: lwarx %0,0,%1 # atomic_add_unless\n\ | 198 | "1: lwarx %0,0,%1 # atomic_add_unless\n\ |
| 199 | cmpw 0,%0,%3 \n\ | 199 | cmpw 0,%0,%3 \n\ |
| 200 | beq- 2f \n\ | 200 | beq- 2f \n\ |
| @@ -202,7 +202,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
| 202 | PPC405_ERR77(0,%2) | 202 | PPC405_ERR77(0,%2) |
| 203 | " stwcx. %0,0,%1 \n\ | 203 | " stwcx. %0,0,%1 \n\ |
| 204 | bne- 1b \n" | 204 | bne- 1b \n" |
| 205 | ISYNC_ON_SMP | 205 | PPC_ACQUIRE_BARRIER |
| 206 | " subf %0,%2,%0 \n\ | 206 | " subf %0,%2,%0 \n\ |
| 207 | 2:" | 207 | 2:" |
| 208 | : "=&r" (t) | 208 | : "=&r" (t) |
| @@ -227,7 +227,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
| 227 | int t; | 227 | int t; |
| 228 | 228 | ||
| 229 | __asm__ __volatile__( | 229 | __asm__ __volatile__( |
| 230 | LWSYNC_ON_SMP | 230 | PPC_RELEASE_BARRIER |
| 231 | "1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ | 231 | "1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ |
| 232 | cmpwi %0,1\n\ | 232 | cmpwi %0,1\n\ |
| 233 | addi %0,%0,-1\n\ | 233 | addi %0,%0,-1\n\ |
| @@ -235,7 +235,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
| 235 | PPC405_ERR77(0,%1) | 235 | PPC405_ERR77(0,%1) |
| 236 | " stwcx. %0,0,%1\n\ | 236 | " stwcx. %0,0,%1\n\ |
| 237 | bne- 1b" | 237 | bne- 1b" |
| 238 | ISYNC_ON_SMP | 238 | PPC_ACQUIRE_BARRIER |
| 239 | "\n\ | 239 | "\n\ |
| 240 | 2:" : "=&b" (t) | 240 | 2:" : "=&b" (t) |
| 241 | : "r" (&v->counter) | 241 | : "r" (&v->counter) |
| @@ -286,12 +286,12 @@ static __inline__ long atomic64_add_return(long a, atomic64_t *v) | |||
| 286 | long t; | 286 | long t; |
| 287 | 287 | ||
| 288 | __asm__ __volatile__( | 288 | __asm__ __volatile__( |
| 289 | LWSYNC_ON_SMP | 289 | PPC_RELEASE_BARRIER |
| 290 | "1: ldarx %0,0,%2 # atomic64_add_return\n\ | 290 | "1: ldarx %0,0,%2 # atomic64_add_return\n\ |
| 291 | add %0,%1,%0\n\ | 291 | add %0,%1,%0\n\ |
| 292 | stdcx. %0,0,%2 \n\ | 292 | stdcx. %0,0,%2 \n\ |
| 293 | bne- 1b" | 293 | bne- 1b" |
| 294 | ISYNC_ON_SMP | 294 | PPC_ACQUIRE_BARRIER |
| 295 | : "=&r" (t) | 295 | : "=&r" (t) |
| 296 | : "r" (a), "r" (&v->counter) | 296 | : "r" (a), "r" (&v->counter) |
| 297 | : "cc", "memory"); | 297 | : "cc", "memory"); |
| @@ -320,12 +320,12 @@ static __inline__ long atomic64_sub_return(long a, atomic64_t *v) | |||
| 320 | long t; | 320 | long t; |
| 321 | 321 | ||
| 322 | __asm__ __volatile__( | 322 | __asm__ __volatile__( |
| 323 | LWSYNC_ON_SMP | 323 | PPC_RELEASE_BARRIER |
| 324 | "1: ldarx %0,0,%2 # atomic64_sub_return\n\ | 324 | "1: ldarx %0,0,%2 # atomic64_sub_return\n\ |
| 325 | subf %0,%1,%0\n\ | 325 | subf %0,%1,%0\n\ |
| 326 | stdcx. %0,0,%2 \n\ | 326 | stdcx. %0,0,%2 \n\ |
| 327 | bne- 1b" | 327 | bne- 1b" |
| 328 | ISYNC_ON_SMP | 328 | PPC_ACQUIRE_BARRIER |
| 329 | : "=&r" (t) | 329 | : "=&r" (t) |
| 330 | : "r" (a), "r" (&v->counter) | 330 | : "r" (a), "r" (&v->counter) |
| 331 | : "cc", "memory"); | 331 | : "cc", "memory"); |
| @@ -352,12 +352,12 @@ static __inline__ long atomic64_inc_return(atomic64_t *v) | |||
| 352 | long t; | 352 | long t; |
| 353 | 353 | ||
| 354 | __asm__ __volatile__( | 354 | __asm__ __volatile__( |
| 355 | LWSYNC_ON_SMP | 355 | PPC_RELEASE_BARRIER |
| 356 | "1: ldarx %0,0,%1 # atomic64_inc_return\n\ | 356 | "1: ldarx %0,0,%1 # atomic64_inc_return\n\ |
| 357 | addic %0,%0,1\n\ | 357 | addic %0,%0,1\n\ |
| 358 | stdcx. %0,0,%1 \n\ | 358 | stdcx. %0,0,%1 \n\ |
| 359 | bne- 1b" | 359 | bne- 1b" |
| 360 | ISYNC_ON_SMP | 360 | PPC_ACQUIRE_BARRIER |
| 361 | : "=&r" (t) | 361 | : "=&r" (t) |
| 362 | : "r" (&v->counter) | 362 | : "r" (&v->counter) |
| 363 | : "cc", "xer", "memory"); | 363 | : "cc", "xer", "memory"); |
| @@ -394,12 +394,12 @@ static __inline__ long atomic64_dec_return(atomic64_t *v) | |||
| 394 | long t; | 394 | long t; |
| 395 | 395 | ||
| 396 | __asm__ __volatile__( | 396 | __asm__ __volatile__( |
| 397 | LWSYNC_ON_SMP | 397 | PPC_RELEASE_BARRIER |
| 398 | "1: ldarx %0,0,%1 # atomic64_dec_return\n\ | 398 | "1: ldarx %0,0,%1 # atomic64_dec_return\n\ |
| 399 | addic %0,%0,-1\n\ | 399 | addic %0,%0,-1\n\ |
| 400 | stdcx. %0,0,%1\n\ | 400 | stdcx. %0,0,%1\n\ |
| 401 | bne- 1b" | 401 | bne- 1b" |
| 402 | ISYNC_ON_SMP | 402 | PPC_ACQUIRE_BARRIER |
| 403 | : "=&r" (t) | 403 | : "=&r" (t) |
| 404 | : "r" (&v->counter) | 404 | : "r" (&v->counter) |
| 405 | : "cc", "xer", "memory"); | 405 | : "cc", "xer", "memory"); |
| @@ -419,13 +419,13 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v) | |||
| 419 | long t; | 419 | long t; |
| 420 | 420 | ||
| 421 | __asm__ __volatile__( | 421 | __asm__ __volatile__( |
| 422 | LWSYNC_ON_SMP | 422 | PPC_RELEASE_BARRIER |
| 423 | "1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\ | 423 | "1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\ |
| 424 | addic. %0,%0,-1\n\ | 424 | addic. %0,%0,-1\n\ |
| 425 | blt- 2f\n\ | 425 | blt- 2f\n\ |
| 426 | stdcx. %0,0,%1\n\ | 426 | stdcx. %0,0,%1\n\ |
| 427 | bne- 1b" | 427 | bne- 1b" |
| 428 | ISYNC_ON_SMP | 428 | PPC_ACQUIRE_BARRIER |
| 429 | "\n\ | 429 | "\n\ |
| 430 | 2:" : "=&r" (t) | 430 | 2:" : "=&r" (t) |
| 431 | : "r" (&v->counter) | 431 | : "r" (&v->counter) |
| @@ -451,14 +451,14 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
| 451 | long t; | 451 | long t; |
| 452 | 452 | ||
| 453 | __asm__ __volatile__ ( | 453 | __asm__ __volatile__ ( |
| 454 | LWSYNC_ON_SMP | 454 | PPC_RELEASE_BARRIER |
| 455 | "1: ldarx %0,0,%1 # atomic_add_unless\n\ | 455 | "1: ldarx %0,0,%1 # atomic_add_unless\n\ |
| 456 | cmpd 0,%0,%3 \n\ | 456 | cmpd 0,%0,%3 \n\ |
| 457 | beq- 2f \n\ | 457 | beq- 2f \n\ |
| 458 | add %0,%2,%0 \n" | 458 | add %0,%2,%0 \n" |
| 459 | " stdcx. %0,0,%1 \n\ | 459 | " stdcx. %0,0,%1 \n\ |
| 460 | bne- 1b \n" | 460 | bne- 1b \n" |
| 461 | ISYNC_ON_SMP | 461 | PPC_ACQUIRE_BARRIER |
| 462 | " subf %0,%2,%0 \n\ | 462 | " subf %0,%2,%0 \n\ |
| 463 | 2:" | 463 | 2:" |
| 464 | : "=&r" (t) | 464 | : "=&r" (t) |
