diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2007-02-17 00:18:23 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@parisc-linux.org> | 2007-02-17 00:18:23 -0500 |
commit | e7b3ca08549caccf5d6e1cf066780bf4f0ae77a7 (patch) | |
tree | 7e5745bea06675cfce60d6813ee3b4d5e19cbb56 /arch/parisc/kernel/smp.c | |
parent | 62d0cfcb27cf755cebdc93ca95dabc83608007cd (diff) | |
parent | cb6efb39163bfb6bb6475fa7c8a5e08e44dbf14a (diff) |
Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git
Conflicts:
arch/parisc/hpux/sys_hpux.c
arch/parisc/mm/ioremap.c
Diffstat (limited to 'arch/parisc/kernel/smp.c')
-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 12cc019307ad..3b67d115fb0a 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 EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(cpu_possible_map); +DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED; struct smp_call_struct { void (*func) (void *info); @@ -167,10 +168,11 @@ ipi_interrupt(int irq, void *dev_id) mb(); /* Order interrupt and bit testing. */ for (;;) { - spin_lock_irqsave(&(p->lock),flags); + spinlock_t *lock = &per_cpu(ipi_lock, this_cpu); + spin_lock_irqsave(lock, flags); ops = p->pending_ipi; p->pending_ipi = 0; - spin_unlock_irqrestore(&(p->lock),flags); + spin_unlock_irqrestore(lock, flags); mb(); /* Order bit clearing and data access. */ @@ -275,12 +277,13 @@ static inline void ipi_send(int cpu, enum ipi_message_type op) { struct cpuinfo_parisc *p = &cpu_data[cpu]; + spinlock_t *lock = &per_cpu(ipi_lock, cpu); unsigned long flags; - spin_lock_irqsave(&(p->lock),flags); + spin_lock_irqsave(lock, flags); p->pending_ipi |= 1 << op; gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa); - spin_unlock_irqrestore(&(p->lock),flags); + spin_unlock_irqrestore(lock, flags); } |