mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
powerpc: Rename LWSYNC_ON_SMP to PPC_RELEASE_BARRIER, ISYNC_ON_SMP to PPC_ACQUIRE_BARRIER
For performance reasons we are about to change ISYNC_ON_SMP to sometimes be lwsync. Now that the macro name doesn't make sense, change it and LWSYNC_ON_SMP to better explain what the barriers are doing. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
66d99b8834
commit
f10e2e5b4b
7 changed files with 65 additions and 60 deletions
|
@ -78,7 +78,7 @@ static __inline__ void fn(unsigned long mask, \
|
|||
|
||||
DEFINE_BITOP(set_bits, or, "", "")
|
||||
DEFINE_BITOP(clear_bits, andc, "", "")
|
||||
DEFINE_BITOP(clear_bits_unlock, andc, LWSYNC_ON_SMP, "")
|
||||
DEFINE_BITOP(clear_bits_unlock, andc, PPC_RELEASE_BARRIER, "")
|
||||
DEFINE_BITOP(change_bits, xor, "", "")
|
||||
|
||||
static __inline__ void set_bit(int nr, volatile unsigned long *addr)
|
||||
|
@ -124,10 +124,14 @@ static __inline__ unsigned long fn( \
|
|||
return (old & mask); \
|
||||
}
|
||||
|
||||
DEFINE_TESTOP(test_and_set_bits, or, LWSYNC_ON_SMP, ISYNC_ON_SMP, 0)
|
||||
DEFINE_TESTOP(test_and_set_bits_lock, or, "", ISYNC_ON_SMP, 1)
|
||||
DEFINE_TESTOP(test_and_clear_bits, andc, LWSYNC_ON_SMP, ISYNC_ON_SMP, 0)
|
||||
DEFINE_TESTOP(test_and_change_bits, xor, LWSYNC_ON_SMP, ISYNC_ON_SMP, 0)
|
||||
DEFINE_TESTOP(test_and_set_bits, or, PPC_RELEASE_BARRIER,
|
||||
PPC_ACQUIRE_BARRIER, 0)
|
||||
DEFINE_TESTOP(test_and_set_bits_lock, or, "",
|
||||
PPC_ACQUIRE_BARRIER, 1)
|
||||
DEFINE_TESTOP(test_and_clear_bits, andc, PPC_RELEASE_BARRIER,
|
||||
PPC_ACQUIRE_BARRIER, 0)
|
||||
DEFINE_TESTOP(test_and_change_bits, xor, PPC_RELEASE_BARRIER,
|
||||
PPC_ACQUIRE_BARRIER, 0)
|
||||
|
||||
static __inline__ int test_and_set_bit(unsigned long nr,
|
||||
volatile unsigned long *addr)
|
||||
|
@ -158,7 +162,7 @@ static __inline__ int test_and_change_bit(unsigned long nr,
|
|||
|
||||
static __inline__ void __clear_bit_unlock(int nr, volatile unsigned long *addr)
|
||||
{
|
||||
__asm__ __volatile__(LWSYNC_ON_SMP "" ::: "memory");
|
||||
__asm__ __volatile__(PPC_RELEASE_BARRIER "" ::: "memory");
|
||||
__clear_bit(nr, addr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue