Commit 9f34ceb6 authored by Heiko Carstens's avatar Heiko Carstens Committed by Ingo Molnar

locking, sparc: Rename __spin_try_lock() and friends

Needed to avoid namespace conflicts when the common code
function bodies of _spin_try_lock() etc. are moved to a header
file where the function name would be __spin_try_lock().
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: <linux-arch@vger.kernel.org>
LKML-Reference: <20090831124416.306495811@de.ibm.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 8307a980
...@@ -76,7 +76,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) ...@@ -76,7 +76,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
* *
* Unfortunately this scheme limits us to ~16,000,000 cpus. * Unfortunately this scheme limits us to ~16,000,000 cpus.
*/ */
static inline void __read_lock(raw_rwlock_t *rw) static inline void arch_read_lock(raw_rwlock_t *rw)
{ {
register raw_rwlock_t *lp asm("g1"); register raw_rwlock_t *lp asm("g1");
lp = rw; lp = rw;
...@@ -92,11 +92,11 @@ static inline void __read_lock(raw_rwlock_t *rw) ...@@ -92,11 +92,11 @@ static inline void __read_lock(raw_rwlock_t *rw)
#define __raw_read_lock(lock) \ #define __raw_read_lock(lock) \
do { unsigned long flags; \ do { unsigned long flags; \
local_irq_save(flags); \ local_irq_save(flags); \
__read_lock(lock); \ arch_read_lock(lock); \
local_irq_restore(flags); \ local_irq_restore(flags); \
} while(0) } while(0)
static inline void __read_unlock(raw_rwlock_t *rw) static inline void arch_read_unlock(raw_rwlock_t *rw)
{ {
register raw_rwlock_t *lp asm("g1"); register raw_rwlock_t *lp asm("g1");
lp = rw; lp = rw;
...@@ -112,7 +112,7 @@ static inline void __read_unlock(raw_rwlock_t *rw) ...@@ -112,7 +112,7 @@ static inline void __read_unlock(raw_rwlock_t *rw)
#define __raw_read_unlock(lock) \ #define __raw_read_unlock(lock) \
do { unsigned long flags; \ do { unsigned long flags; \
local_irq_save(flags); \ local_irq_save(flags); \
__read_unlock(lock); \ arch_read_unlock(lock); \
local_irq_restore(flags); \ local_irq_restore(flags); \
} while(0) } while(0)
...@@ -150,7 +150,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) ...@@ -150,7 +150,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
return (val == 0); return (val == 0);
} }
static inline int __read_trylock(raw_rwlock_t *rw) static inline int arch_read_trylock(raw_rwlock_t *rw)
{ {
register raw_rwlock_t *lp asm("g1"); register raw_rwlock_t *lp asm("g1");
register int res asm("o0"); register int res asm("o0");
...@@ -169,7 +169,7 @@ static inline int __read_trylock(raw_rwlock_t *rw) ...@@ -169,7 +169,7 @@ static inline int __read_trylock(raw_rwlock_t *rw)
({ unsigned long flags; \ ({ unsigned long flags; \
int res; \ int res; \
local_irq_save(flags); \ local_irq_save(flags); \
res = __read_trylock(lock); \ res = arch_read_trylock(lock); \
local_irq_restore(flags); \ local_irq_restore(flags); \
res; \ res; \
}) })
......
...@@ -92,7 +92,7 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla ...@@ -92,7 +92,7 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla
/* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */ /* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */
static void inline __read_lock(raw_rwlock_t *lock) static void inline arch_read_lock(raw_rwlock_t *lock)
{ {
unsigned long tmp1, tmp2; unsigned long tmp1, tmp2;
...@@ -115,7 +115,7 @@ static void inline __read_lock(raw_rwlock_t *lock) ...@@ -115,7 +115,7 @@ static void inline __read_lock(raw_rwlock_t *lock)
: "memory"); : "memory");
} }
static int inline __read_trylock(raw_rwlock_t *lock) static int inline arch_read_trylock(raw_rwlock_t *lock)
{ {
int tmp1, tmp2; int tmp1, tmp2;
...@@ -136,7 +136,7 @@ static int inline __read_trylock(raw_rwlock_t *lock) ...@@ -136,7 +136,7 @@ static int inline __read_trylock(raw_rwlock_t *lock)
return tmp1; return tmp1;
} }
static void inline __read_unlock(raw_rwlock_t *lock) static void inline arch_read_unlock(raw_rwlock_t *lock)
{ {
unsigned long tmp1, tmp2; unsigned long tmp1, tmp2;
...@@ -152,7 +152,7 @@ static void inline __read_unlock(raw_rwlock_t *lock) ...@@ -152,7 +152,7 @@ static void inline __read_unlock(raw_rwlock_t *lock)
: "memory"); : "memory");
} }
static void inline __write_lock(raw_rwlock_t *lock) static void inline arch_write_lock(raw_rwlock_t *lock)
{ {
unsigned long mask, tmp1, tmp2; unsigned long mask, tmp1, tmp2;
...@@ -177,7 +177,7 @@ static void inline __write_lock(raw_rwlock_t *lock) ...@@ -177,7 +177,7 @@ static void inline __write_lock(raw_rwlock_t *lock)
: "memory"); : "memory");
} }
static void inline __write_unlock(raw_rwlock_t *lock) static void inline arch_write_unlock(raw_rwlock_t *lock)
{ {
__asm__ __volatile__( __asm__ __volatile__(
" stw %%g0, [%0]" " stw %%g0, [%0]"
...@@ -186,7 +186,7 @@ static void inline __write_unlock(raw_rwlock_t *lock) ...@@ -186,7 +186,7 @@ static void inline __write_unlock(raw_rwlock_t *lock)
: "memory"); : "memory");
} }
static int inline __write_trylock(raw_rwlock_t *lock) static int inline arch_write_trylock(raw_rwlock_t *lock)
{ {
unsigned long mask, tmp1, tmp2, result; unsigned long mask, tmp1, tmp2, result;
...@@ -210,14 +210,14 @@ static int inline __write_trylock(raw_rwlock_t *lock) ...@@ -210,14 +210,14 @@ static int inline __write_trylock(raw_rwlock_t *lock)
return result; return result;
} }
#define __raw_read_lock(p) __read_lock(p) #define __raw_read_lock(p) arch_read_lock(p)
#define __raw_read_lock_flags(p, f) __read_lock(p) #define __raw_read_lock_flags(p, f) arch_read_lock(p)
#define __raw_read_trylock(p) __read_trylock(p) #define __raw_read_trylock(p) arch_read_trylock(p)
#define __raw_read_unlock(p) __read_unlock(p) #define __raw_read_unlock(p) arch_read_unlock(p)
#define __raw_write_lock(p) __write_lock(p) #define __raw_write_lock(p) arch_write_lock(p)
#define __raw_write_lock_flags(p, f) __write_lock(p) #define __raw_write_lock_flags(p, f) arch_write_lock(p)
#define __raw_write_unlock(p) __write_unlock(p) #define __raw_write_unlock(p) arch_write_unlock(p)
#define __raw_write_trylock(p) __write_trylock(p) #define __raw_write_trylock(p) arch_write_trylock(p)
#define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL))
#define __raw_write_can_lock(rw) (!(rw)->lock) #define __raw_write_can_lock(rw) (!(rw)->lock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment