diff options
author | Anton Blanchard <anton@samba.org> | 2006-01-13 05:37:17 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-13 11:18:50 +0100 |
commit | 144b9c135b963bcb7f242c7b83bff930620d3161 (patch) | |
tree | 4b454f3e5e5921c5a528131dfa51df542259d918 /include/asm-powerpc/futex.h | |
parent | [PATCH] powerpc: Remove lppaca structure from the PACA (diff) | |
download | linux-144b9c135b963bcb7f242c7b83bff930620d3161.tar.xz linux-144b9c135b963bcb7f242c7b83bff930620d3161.zip |
[PATCH] powerpc: use lwsync in atomics, bitops, lock functions
eieio is only a store - store ordering. When used to order an unlock
operation loads may leak out of the critical region. This is potentially
buggy, one example is if a user wants to atomically read a couple of
values.
We can solve this with an lwsync which orders everything except store - load.
I removed the (now unused) EIEIO_ON_SMP macros and the c versions
isync_on_smp and eieio_on_smp now we dont use them. I also removed some
old comments that were used to identify inline spinlocks in assembly,
they dont make sense now our locks are out of line.
Another interesting thing was that read_unlock was using an eieio even
though the rest of the spinlock code had already been converted to
use lwsync.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/futex.h')
-rw-r--r-- | include/asm-powerpc/futex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-powerpc/futex.h b/include/asm-powerpc/futex.h index f0319d50b129..39e85f320a76 100644 --- a/include/asm-powerpc/futex.h +++ b/include/asm-powerpc/futex.h @@ -11,7 +11,7 @@ #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ __asm__ __volatile ( \ - SYNC_ON_SMP \ + LWSYNC_ON_SMP \ "1: lwarx %0,0,%2\n" \ insn \ PPC405_ERR77(0, %2) \ |