diff options
author | Kyle McMartin <kyle@mako.i.cabal.ca> | 2006-12-07 23:52:27 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@ubuntu.com> | 2006-12-08 00:34:49 -0500 |
commit | 3c97b5e93faf9262407835046effc886efefa0a6 (patch) | |
tree | 287336a38d1e32160b8d52e2273062b6de1b509c /arch | |
parent | 6858f3bf6e856d10a932d2d167d3f34e366042c6 (diff) |
[PARISC] Move spinlock_t out of struct cpu_data
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/smp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 4a23a97b06cd..5b6bc6e8a42f 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -76,6 +76,7 @@ cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; /* Bitmap of Present CP | |||
76 | EXPORT_SYMBOL(cpu_online_map); | 76 | EXPORT_SYMBOL(cpu_online_map); |
77 | EXPORT_SYMBOL(cpu_possible_map); | 77 | EXPORT_SYMBOL(cpu_possible_map); |
78 | 78 | ||
79 | DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED; | ||
79 | 80 | ||
80 | struct smp_call_struct { | 81 | struct smp_call_struct { |
81 | void (*func) (void *info); | 82 | void (*func) (void *info); |
@@ -167,10 +168,11 @@ ipi_interrupt(int irq, void *dev_id) | |||
167 | mb(); /* Order interrupt and bit testing. */ | 168 | mb(); /* Order interrupt and bit testing. */ |
168 | 169 | ||
169 | for (;;) { | 170 | for (;;) { |
170 | spin_lock_irqsave(&(p->lock),flags); | 171 | spinlock_t *lock = &per_cpu(ipi_lock, this_cpu); |
172 | spin_lock_irqsave(lock, flags); | ||
171 | ops = p->pending_ipi; | 173 | ops = p->pending_ipi; |
172 | p->pending_ipi = 0; | 174 | p->pending_ipi = 0; |
173 | spin_unlock_irqrestore(&(p->lock),flags); | 175 | spin_unlock_irqrestore(lock, flags); |
174 | 176 | ||
175 | mb(); /* Order bit clearing and data access. */ | 177 | mb(); /* Order bit clearing and data access. */ |
176 | 178 | ||
@@ -275,12 +277,13 @@ static inline void | |||
275 | ipi_send(int cpu, enum ipi_message_type op) | 277 | ipi_send(int cpu, enum ipi_message_type op) |
276 | { | 278 | { |
277 | struct cpuinfo_parisc *p = &cpu_data[cpu]; | 279 | struct cpuinfo_parisc *p = &cpu_data[cpu]; |
280 | spinlock_t *lock = &per_cpu(ipi_lock, cpu); | ||
278 | unsigned long flags; | 281 | unsigned long flags; |
279 | 282 | ||
280 | spin_lock_irqsave(&(p->lock),flags); | 283 | spin_lock_irqsave(lock, flags); |
281 | p->pending_ipi |= 1 << op; | 284 | p->pending_ipi |= 1 << op; |
282 | gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa); | 285 | gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa); |
283 | spin_unlock_irqrestore(&(p->lock),flags); | 286 | spin_unlock_irqrestore(lock, flags); |
284 | } | 287 | } |
285 | 288 | ||
286 | 289 | ||