diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 12:02:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 12:02:01 -0500 |
commit | 8f0ddf91f2aeb09602373e400cf8b403e9017210 (patch) | |
tree | b907c35c79caadafff6ad46a91614e30afd2f967 /arch/arm | |
parent | 050cbb09dac0402672edeaeac06094ef8ff1749a (diff) | |
parent | b5f91da0a6973bb6f9ff3b91b0e92c0773a458f3 (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits)
clockevents: Convert to raw_spinlock
clockevents: Make tick_device_lock static
debugobjects: Convert to raw_spinlocks
perf_event: Convert to raw_spinlock
hrtimers: Convert to raw_spinlocks
genirq: Convert irq_desc.lock to raw_spinlock
smp: Convert smplocks to raw_spinlocks
rtmutes: Convert rtmutex.lock to raw_spinlock
sched: Convert pi_lock to raw_spinlock
sched: Convert cpupri lock to raw_spinlock
sched: Convert rt_runtime_lock to raw_spinlock
sched: Convert rq->lock to raw_spinlock
plist: Make plist debugging raw_spinlock aware
bkl: Fixup core_lock fallout
locking: Cleanup the name space completely
locking: Further name space cleanups
alpha: Fix fallout from locking changes
locking: Implement new raw_spinlock
locking: Convert raw_rwlock functions to arch_rwlock
locking: Convert raw_rwlock to arch_rwlock
...
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/mach/irq.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/spinlock.h | 40 | ||||
-rw-r--r-- | arch/arm/include/asm/spinlock_types.h | 8 | ||||
-rw-r--r-- | arch/arm/kernel/irq.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/irq.c | 8 |
5 files changed, 36 insertions, 36 deletions
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index acac5302e4ea..8920b2d6e3b8 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h | |||
@@ -26,9 +26,9 @@ extern int show_fiq_list(struct seq_file *, void *); | |||
26 | */ | 26 | */ |
27 | #define do_bad_IRQ(irq,desc) \ | 27 | #define do_bad_IRQ(irq,desc) \ |
28 | do { \ | 28 | do { \ |
29 | spin_lock(&desc->lock); \ | 29 | raw_spin_lock(&desc->lock); \ |
30 | handle_bad_irq(irq, desc); \ | 30 | handle_bad_irq(irq, desc); \ |
31 | spin_unlock(&desc->lock); \ | 31 | raw_spin_unlock(&desc->lock); \ |
32 | } while(0) | 32 | } while(0) |
33 | 33 | ||
34 | #endif | 34 | #endif |
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h index c13681ac1ede..c91c64cab922 100644 --- a/arch/arm/include/asm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h | |||
@@ -17,13 +17,13 @@ | |||
17 | * Locked value: 1 | 17 | * Locked value: 1 |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #define __raw_spin_is_locked(x) ((x)->lock != 0) | 20 | #define arch_spin_is_locked(x) ((x)->lock != 0) |
21 | #define __raw_spin_unlock_wait(lock) \ | 21 | #define arch_spin_unlock_wait(lock) \ |
22 | do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) | 22 | do { while (arch_spin_is_locked(lock)) cpu_relax(); } while (0) |
23 | 23 | ||
24 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) | 24 | #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock) |
25 | 25 | ||
26 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 26 | static inline void arch_spin_lock(arch_spinlock_t *lock) |
27 | { | 27 | { |
28 | unsigned long tmp; | 28 | unsigned long tmp; |
29 | 29 | ||
@@ -43,7 +43,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
43 | smp_mb(); | 43 | smp_mb(); |
44 | } | 44 | } |
45 | 45 | ||
46 | static inline int __raw_spin_trylock(raw_spinlock_t *lock) | 46 | static inline int arch_spin_trylock(arch_spinlock_t *lock) |
47 | { | 47 | { |
48 | unsigned long tmp; | 48 | unsigned long tmp; |
49 | 49 | ||
@@ -63,7 +63,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) | |||
63 | } | 63 | } |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 66 | static inline void arch_spin_unlock(arch_spinlock_t *lock) |
67 | { | 67 | { |
68 | smp_mb(); | 68 | smp_mb(); |
69 | 69 | ||
@@ -86,7 +86,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
86 | * just write zero since the lock is exclusively held. | 86 | * just write zero since the lock is exclusively held. |
87 | */ | 87 | */ |
88 | 88 | ||
89 | static inline void __raw_write_lock(raw_rwlock_t *rw) | 89 | static inline void arch_write_lock(arch_rwlock_t *rw) |
90 | { | 90 | { |
91 | unsigned long tmp; | 91 | unsigned long tmp; |
92 | 92 | ||
@@ -106,7 +106,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw) | |||
106 | smp_mb(); | 106 | smp_mb(); |
107 | } | 107 | } |
108 | 108 | ||
109 | static inline int __raw_write_trylock(raw_rwlock_t *rw) | 109 | static inline int arch_write_trylock(arch_rwlock_t *rw) |
110 | { | 110 | { |
111 | unsigned long tmp; | 111 | unsigned long tmp; |
112 | 112 | ||
@@ -126,7 +126,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 129 | static inline void arch_write_unlock(arch_rwlock_t *rw) |
130 | { | 130 | { |
131 | smp_mb(); | 131 | smp_mb(); |
132 | 132 | ||
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | /* write_can_lock - would write_trylock() succeed? */ | 144 | /* write_can_lock - would write_trylock() succeed? */ |
145 | #define __raw_write_can_lock(x) ((x)->lock == 0) | 145 | #define arch_write_can_lock(x) ((x)->lock == 0) |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * Read locks are a bit more hairy: | 148 | * Read locks are a bit more hairy: |
@@ -156,7 +156,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
156 | * currently active. However, we know we won't have any write | 156 | * currently active. However, we know we won't have any write |
157 | * locks. | 157 | * locks. |
158 | */ | 158 | */ |
159 | static inline void __raw_read_lock(raw_rwlock_t *rw) | 159 | static inline void arch_read_lock(arch_rwlock_t *rw) |
160 | { | 160 | { |
161 | unsigned long tmp, tmp2; | 161 | unsigned long tmp, tmp2; |
162 | 162 | ||
@@ -176,7 +176,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
176 | smp_mb(); | 176 | smp_mb(); |
177 | } | 177 | } |
178 | 178 | ||
179 | static inline void __raw_read_unlock(raw_rwlock_t *rw) | 179 | static inline void arch_read_unlock(arch_rwlock_t *rw) |
180 | { | 180 | { |
181 | unsigned long tmp, tmp2; | 181 | unsigned long tmp, tmp2; |
182 | 182 | ||
@@ -198,7 +198,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
198 | : "cc"); | 198 | : "cc"); |
199 | } | 199 | } |
200 | 200 | ||
201 | static inline int __raw_read_trylock(raw_rwlock_t *rw) | 201 | static inline int arch_read_trylock(arch_rwlock_t *rw) |
202 | { | 202 | { |
203 | unsigned long tmp, tmp2 = 1; | 203 | unsigned long tmp, tmp2 = 1; |
204 | 204 | ||
@@ -215,13 +215,13 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) | |||
215 | } | 215 | } |
216 | 216 | ||
217 | /* read_can_lock - would read_trylock() succeed? */ | 217 | /* read_can_lock - would read_trylock() succeed? */ |
218 | #define __raw_read_can_lock(x) ((x)->lock < 0x80000000) | 218 | #define arch_read_can_lock(x) ((x)->lock < 0x80000000) |
219 | 219 | ||
220 | #define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) | 220 | #define arch_read_lock_flags(lock, flags) arch_read_lock(lock) |
221 | #define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) | 221 | #define arch_write_lock_flags(lock, flags) arch_write_lock(lock) |
222 | 222 | ||
223 | #define _raw_spin_relax(lock) cpu_relax() | 223 | #define arch_spin_relax(lock) cpu_relax() |
224 | #define _raw_read_relax(lock) cpu_relax() | 224 | #define arch_read_relax(lock) cpu_relax() |
225 | #define _raw_write_relax(lock) cpu_relax() | 225 | #define arch_write_relax(lock) cpu_relax() |
226 | 226 | ||
227 | #endif /* __ASM_SPINLOCK_H */ | 227 | #endif /* __ASM_SPINLOCK_H */ |
diff --git a/arch/arm/include/asm/spinlock_types.h b/arch/arm/include/asm/spinlock_types.h index 43e83f6d2ee5..d14d197ae04a 100644 --- a/arch/arm/include/asm/spinlock_types.h +++ b/arch/arm/include/asm/spinlock_types.h | |||
@@ -7,14 +7,14 @@ | |||
7 | 7 | ||
8 | typedef struct { | 8 | typedef struct { |
9 | volatile unsigned int lock; | 9 | volatile unsigned int lock; |
10 | } raw_spinlock_t; | 10 | } arch_spinlock_t; |
11 | 11 | ||
12 | #define __RAW_SPIN_LOCK_UNLOCKED { 0 } | 12 | #define __ARCH_SPIN_LOCK_UNLOCKED { 0 } |
13 | 13 | ||
14 | typedef struct { | 14 | typedef struct { |
15 | volatile unsigned int lock; | 15 | volatile unsigned int lock; |
16 | } raw_rwlock_t; | 16 | } arch_rwlock_t; |
17 | 17 | ||
18 | #define __RAW_RW_LOCK_UNLOCKED { 0 } | 18 | #define __ARCH_RW_LOCK_UNLOCKED { 0 } |
19 | 19 | ||
20 | #endif | 20 | #endif |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index c9a8619f3856..b7cb45bb91e8 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | if (i < NR_IRQS) { | 71 | if (i < NR_IRQS) { |
72 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 72 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |
73 | action = irq_desc[i].action; | 73 | action = irq_desc[i].action; |
74 | if (!action) | 74 | if (!action) |
75 | goto unlock; | 75 | goto unlock; |
@@ -84,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
84 | 84 | ||
85 | seq_putc(p, '\n'); | 85 | seq_putc(p, '\n'); |
86 | unlock: | 86 | unlock: |
87 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 87 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
88 | } else if (i == NR_IRQS) { | 88 | } else if (i == NR_IRQS) { |
89 | #ifdef CONFIG_FIQ | 89 | #ifdef CONFIG_FIQ |
90 | show_fiq_list(p, v); | 90 | show_fiq_list(p, v); |
@@ -139,7 +139,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
139 | } | 139 | } |
140 | 140 | ||
141 | desc = irq_desc + irq; | 141 | desc = irq_desc + irq; |
142 | spin_lock_irqsave(&desc->lock, flags); | 142 | raw_spin_lock_irqsave(&desc->lock, flags); |
143 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; | 143 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; |
144 | if (iflags & IRQF_VALID) | 144 | if (iflags & IRQF_VALID) |
145 | desc->status &= ~IRQ_NOREQUEST; | 145 | desc->status &= ~IRQ_NOREQUEST; |
@@ -147,7 +147,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
147 | desc->status &= ~IRQ_NOPROBE; | 147 | desc->status &= ~IRQ_NOPROBE; |
148 | if (!(iflags & IRQF_NOAUTOEN)) | 148 | if (!(iflags & IRQF_NOAUTOEN)) |
149 | desc->status &= ~IRQ_NOAUTOEN; | 149 | desc->status &= ~IRQ_NOAUTOEN; |
150 | spin_unlock_irqrestore(&desc->lock, flags); | 150 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
151 | } | 151 | } |
152 | 152 | ||
153 | void __init init_IRQ(void) | 153 | void __init init_IRQ(void) |
@@ -166,9 +166,9 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) | |||
166 | { | 166 | { |
167 | pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu); | 167 | pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu); |
168 | 168 | ||
169 | spin_lock_irq(&desc->lock); | 169 | raw_spin_lock_irq(&desc->lock); |
170 | desc->chip->set_affinity(irq, cpumask_of(cpu)); | 170 | desc->chip->set_affinity(irq, cpumask_of(cpu)); |
171 | spin_unlock_irq(&desc->lock); | 171 | raw_spin_unlock_irq(&desc->lock); |
172 | } | 172 | } |
173 | 173 | ||
174 | /* | 174 | /* |
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c index feb0e54a91de..038f24d47023 100644 --- a/arch/arm/mach-ns9xxx/irq.c +++ b/arch/arm/mach-ns9xxx/irq.c | |||
@@ -66,7 +66,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) | |||
66 | struct irqaction *action; | 66 | struct irqaction *action; |
67 | irqreturn_t action_ret; | 67 | irqreturn_t action_ret; |
68 | 68 | ||
69 | spin_lock(&desc->lock); | 69 | raw_spin_lock(&desc->lock); |
70 | 70 | ||
71 | BUG_ON(desc->status & IRQ_INPROGRESS); | 71 | BUG_ON(desc->status & IRQ_INPROGRESS); |
72 | 72 | ||
@@ -78,7 +78,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) | |||
78 | goto out_mask; | 78 | goto out_mask; |
79 | 79 | ||
80 | desc->status |= IRQ_INPROGRESS; | 80 | desc->status |= IRQ_INPROGRESS; |
81 | spin_unlock(&desc->lock); | 81 | raw_spin_unlock(&desc->lock); |
82 | 82 | ||
83 | action_ret = handle_IRQ_event(irq, action); | 83 | action_ret = handle_IRQ_event(irq, action); |
84 | 84 | ||
@@ -87,7 +87,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) | |||
87 | * Maybe this function should go to kernel/irq/chip.c? */ | 87 | * Maybe this function should go to kernel/irq/chip.c? */ |
88 | note_interrupt(irq, desc, action_ret); | 88 | note_interrupt(irq, desc, action_ret); |
89 | 89 | ||
90 | spin_lock(&desc->lock); | 90 | raw_spin_lock(&desc->lock); |
91 | desc->status &= ~IRQ_INPROGRESS; | 91 | desc->status &= ~IRQ_INPROGRESS; |
92 | 92 | ||
93 | if (desc->status & IRQ_DISABLED) | 93 | if (desc->status & IRQ_DISABLED) |
@@ -97,7 +97,7 @@ out_mask: | |||
97 | /* ack unconditionally to unmask lower prio irqs */ | 97 | /* ack unconditionally to unmask lower prio irqs */ |
98 | desc->chip->ack(irq); | 98 | desc->chip->ack(irq); |
99 | 99 | ||
100 | spin_unlock(&desc->lock); | 100 | raw_spin_unlock(&desc->lock); |
101 | } | 101 | } |
102 | #define handle_irq handle_prio_irq | 102 | #define handle_irq handle_prio_irq |
103 | #endif | 103 | #endif |