diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-02 13:49:50 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-14 17:55:32 -0500 |
commit | 445c89514be242b1b0080056d50bdc1b72adeb5c (patch) | |
tree | 96ed062794ad0fb6a649713c83f009eea382e8b2 /arch/powerpc/include | |
parent | 6b6b4792f89346e47437682c7ba3438e6681c0f9 (diff) |
locking: Convert raw_spinlock to arch_spinlock
The raw_spin* namespace was taken by lockdep for the architecture
specific implementations. raw_spin_* would be the ideal name space for
the spinlocks which are not converted to sleeping locks in preempt-rt.
Linus suggested to convert the raw_ to arch_ locks and cleanup the
name space instead of using an artifical name like core_spin,
atomic_spin or whatever
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/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/rtas.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/spinlock.h | 14 | ||||
-rw-r--r-- | arch/powerpc/include/asm/spinlock_types.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index 168fce726201..20de73c36682 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h | |||
@@ -58,7 +58,7 @@ struct rtas_t { | |||
58 | unsigned long entry; /* physical address pointer */ | 58 | unsigned long entry; /* physical address pointer */ |
59 | unsigned long base; /* physical address pointer */ | 59 | unsigned long base; /* physical address pointer */ |
60 | unsigned long size; | 60 | unsigned long size; |
61 | raw_spinlock_t lock; | 61 | arch_spinlock_t lock; |
62 | struct rtas_args args; | 62 | struct rtas_args args; |
63 | struct device_node *dev; /* virtual address pointer */ | 63 | struct device_node *dev; /* virtual address pointer */ |
64 | }; | 64 | }; |
diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h index 198266cf9e2d..c0d44c92ff0e 100644 --- a/arch/powerpc/include/asm/spinlock.h +++ b/arch/powerpc/include/asm/spinlock.h | |||
@@ -54,7 +54,7 @@ | |||
54 | * This returns the old value in the lock, so we succeeded | 54 | * This returns the old value in the lock, so we succeeded |
55 | * in getting the lock if the return value is 0. | 55 | * in getting the lock if the return value is 0. |
56 | */ | 56 | */ |
57 | static inline unsigned long arch_spin_trylock(raw_spinlock_t *lock) | 57 | static inline unsigned long arch_spin_trylock(arch_spinlock_t *lock) |
58 | { | 58 | { |
59 | unsigned long tmp, token; | 59 | unsigned long tmp, token; |
60 | 60 | ||
@@ -73,7 +73,7 @@ static inline unsigned long arch_spin_trylock(raw_spinlock_t *lock) | |||
73 | return tmp; | 73 | return tmp; |
74 | } | 74 | } |
75 | 75 | ||
76 | static inline int __raw_spin_trylock(raw_spinlock_t *lock) | 76 | static inline int __raw_spin_trylock(arch_spinlock_t *lock) |
77 | { | 77 | { |
78 | CLEAR_IO_SYNC; | 78 | CLEAR_IO_SYNC; |
79 | return arch_spin_trylock(lock) == 0; | 79 | return arch_spin_trylock(lock) == 0; |
@@ -96,7 +96,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) | |||
96 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) | 96 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) |
97 | /* We only yield to the hypervisor if we are in shared processor mode */ | 97 | /* We only yield to the hypervisor if we are in shared processor mode */ |
98 | #define SHARED_PROCESSOR (get_lppaca()->shared_proc) | 98 | #define SHARED_PROCESSOR (get_lppaca()->shared_proc) |
99 | extern void __spin_yield(raw_spinlock_t *lock); | 99 | extern void __spin_yield(arch_spinlock_t *lock); |
100 | extern void __rw_yield(raw_rwlock_t *lock); | 100 | extern void __rw_yield(raw_rwlock_t *lock); |
101 | #else /* SPLPAR || ISERIES */ | 101 | #else /* SPLPAR || ISERIES */ |
102 | #define __spin_yield(x) barrier() | 102 | #define __spin_yield(x) barrier() |
@@ -104,7 +104,7 @@ extern void __rw_yield(raw_rwlock_t *lock); | |||
104 | #define SHARED_PROCESSOR 0 | 104 | #define SHARED_PROCESSOR 0 |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 107 | static inline void __raw_spin_lock(arch_spinlock_t *lock) |
108 | { | 108 | { |
109 | CLEAR_IO_SYNC; | 109 | CLEAR_IO_SYNC; |
110 | while (1) { | 110 | while (1) { |
@@ -120,7 +120,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | static inline | 122 | static inline |
123 | void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) | 123 | void __raw_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) |
124 | { | 124 | { |
125 | unsigned long flags_dis; | 125 | unsigned long flags_dis; |
126 | 126 | ||
@@ -140,7 +140,7 @@ void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 143 | static inline void __raw_spin_unlock(arch_spinlock_t *lock) |
144 | { | 144 | { |
145 | SYNC_IO; | 145 | SYNC_IO; |
146 | __asm__ __volatile__("# __raw_spin_unlock\n\t" | 146 | __asm__ __volatile__("# __raw_spin_unlock\n\t" |
@@ -149,7 +149,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
149 | } | 149 | } |
150 | 150 | ||
151 | #ifdef CONFIG_PPC64 | 151 | #ifdef CONFIG_PPC64 |
152 | extern void __raw_spin_unlock_wait(raw_spinlock_t *lock); | 152 | extern void __raw_spin_unlock_wait(arch_spinlock_t *lock); |
153 | #else | 153 | #else |
154 | #define __raw_spin_unlock_wait(lock) \ | 154 | #define __raw_spin_unlock_wait(lock) \ |
155 | do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) | 155 | do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) |
diff --git a/arch/powerpc/include/asm/spinlock_types.h b/arch/powerpc/include/asm/spinlock_types.h index 74236c9f05b1..4312e5baaf88 100644 --- a/arch/powerpc/include/asm/spinlock_types.h +++ b/arch/powerpc/include/asm/spinlock_types.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | typedef struct { | 8 | typedef struct { |
9 | volatile unsigned int slock; | 9 | volatile unsigned int slock; |
10 | } raw_spinlock_t; | 10 | } arch_spinlock_t; |
11 | 11 | ||
12 | #define __RAW_SPIN_LOCK_UNLOCKED { 0 } | 12 | #define __RAW_SPIN_LOCK_UNLOCKED { 0 } |
13 | 13 | ||