diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-02 14:01:25 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-14 17:55:32 -0500 |
commit | 0199c4e68d1f02894bdefe4b5d9e9ee4aedd8d62 (patch) | |
tree | e371d17bd73d64332349debbf45962ec67e7269d /arch/sh/include/asm/spinlock.h | |
parent | edc35bd72e2079b25f99c5da7d7a65dbbffc4a26 (diff) |
locking: Convert __raw_spin* functions to arch_spin*
Name space cleanup. No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: linux-arch@vger.kernel.org
Diffstat (limited to 'arch/sh/include/asm/spinlock.h')
-rw-r--r-- | arch/sh/include/asm/spinlock.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/sh/include/asm/spinlock.h b/arch/sh/include/asm/spinlock.h index 5a05b3fcefb..da1c6491ed4 100644 --- a/arch/sh/include/asm/spinlock.h +++ b/arch/sh/include/asm/spinlock.h | |||
@@ -23,10 +23,10 @@ | |||
23 | * Your basic SMP spinlocks, allowing only a single CPU anywhere | 23 | * Your basic SMP spinlocks, allowing only a single CPU anywhere |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define __raw_spin_is_locked(x) ((x)->lock <= 0) | 26 | #define arch_spin_is_locked(x) ((x)->lock <= 0) |
27 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) | 27 | #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock) |
28 | #define __raw_spin_unlock_wait(x) \ | 28 | #define arch_spin_unlock_wait(x) \ |
29 | do { while (__raw_spin_is_locked(x)) cpu_relax(); } while (0) | 29 | do { while (arch_spin_is_locked(x)) cpu_relax(); } while (0) |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Simple spin lock operations. There are two variants, one clears IRQ's | 32 | * Simple spin lock operations. There are two variants, one clears IRQ's |
@@ -34,14 +34,14 @@ | |||
34 | * | 34 | * |
35 | * We make no fairness assumptions. They have a cost. | 35 | * We make no fairness assumptions. They have a cost. |
36 | */ | 36 | */ |
37 | static inline void __raw_spin_lock(arch_spinlock_t *lock) | 37 | static inline void arch_spin_lock(arch_spinlock_t *lock) |
38 | { | 38 | { |
39 | unsigned long tmp; | 39 | unsigned long tmp; |
40 | unsigned long oldval; | 40 | unsigned long oldval; |
41 | 41 | ||
42 | __asm__ __volatile__ ( | 42 | __asm__ __volatile__ ( |
43 | "1: \n\t" | 43 | "1: \n\t" |
44 | "movli.l @%2, %0 ! __raw_spin_lock \n\t" | 44 | "movli.l @%2, %0 ! arch_spin_lock \n\t" |
45 | "mov %0, %1 \n\t" | 45 | "mov %0, %1 \n\t" |
46 | "mov #0, %0 \n\t" | 46 | "mov #0, %0 \n\t" |
47 | "movco.l %0, @%2 \n\t" | 47 | "movco.l %0, @%2 \n\t" |
@@ -54,12 +54,12 @@ static inline void __raw_spin_lock(arch_spinlock_t *lock) | |||
54 | ); | 54 | ); |
55 | } | 55 | } |
56 | 56 | ||
57 | static inline void __raw_spin_unlock(arch_spinlock_t *lock) | 57 | static inline void arch_spin_unlock(arch_spinlock_t *lock) |
58 | { | 58 | { |
59 | unsigned long tmp; | 59 | unsigned long tmp; |
60 | 60 | ||
61 | __asm__ __volatile__ ( | 61 | __asm__ __volatile__ ( |
62 | "mov #1, %0 ! __raw_spin_unlock \n\t" | 62 | "mov #1, %0 ! arch_spin_unlock \n\t" |
63 | "mov.l %0, @%1 \n\t" | 63 | "mov.l %0, @%1 \n\t" |
64 | : "=&z" (tmp) | 64 | : "=&z" (tmp) |
65 | : "r" (&lock->lock) | 65 | : "r" (&lock->lock) |
@@ -67,13 +67,13 @@ static inline void __raw_spin_unlock(arch_spinlock_t *lock) | |||
67 | ); | 67 | ); |
68 | } | 68 | } |
69 | 69 | ||
70 | static inline int __raw_spin_trylock(arch_spinlock_t *lock) | 70 | static inline int arch_spin_trylock(arch_spinlock_t *lock) |
71 | { | 71 | { |
72 | unsigned long tmp, oldval; | 72 | unsigned long tmp, oldval; |
73 | 73 | ||
74 | __asm__ __volatile__ ( | 74 | __asm__ __volatile__ ( |
75 | "1: \n\t" | 75 | "1: \n\t" |
76 | "movli.l @%2, %0 ! __raw_spin_trylock \n\t" | 76 | "movli.l @%2, %0 ! arch_spin_trylock \n\t" |
77 | "mov %0, %1 \n\t" | 77 | "mov %0, %1 \n\t" |
78 | "mov #0, %0 \n\t" | 78 | "mov #0, %0 \n\t" |
79 | "movco.l %0, @%2 \n\t" | 79 | "movco.l %0, @%2 \n\t" |
@@ -219,8 +219,8 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
219 | #define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) | 219 | #define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) |
220 | #define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) | 220 | #define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) |
221 | 221 | ||
222 | #define _raw_spin_relax(lock) cpu_relax() | 222 | #define arch_spin_relax(lock) cpu_relax() |
223 | #define _raw_read_relax(lock) cpu_relax() | 223 | #define arch_read_relax(lock) cpu_relax() |
224 | #define _raw_write_relax(lock) cpu_relax() | 224 | #define arch_write_relax(lock) cpu_relax() |
225 | 225 | ||
226 | #endif /* __ASM_SH_SPINLOCK_H */ | 226 | #endif /* __ASM_SH_SPINLOCK_H */ |