summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-09-08 15:43:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-08 15:43:02 -0700
commitb364e2f5262e972e731a576dfc6ede0689a6c19e (patch)
tree74b9aacb2950a074e83158c3c024bd3e3a974d84 /arch
parent06dd881f59b3c07a430cdcbef2197f9b6dc79ae8 (diff)
parent4d084617fb0d025c42c242362d1f27d337e2d407 (diff)
downloadop-kernel-dev-b364e2f5262e972e731a576dfc6ede0689a6c19e.zip
op-kernel-dev-b364e2f5262e972e731a576dfc6ede0689a6c19e.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Prevent sparc64 from invoking irq handlers on offline CPUs sparc64: Fix IPI call locking.
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/smp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 743ccad..2be166c 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -80,8 +80,6 @@ void smp_bogo(struct seq_file *m)
i, cpu_data(i).clock_tick);
}
-static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
-
extern void setup_sparc64_timer(void);
static volatile unsigned long callin_flag = 0;
@@ -120,9 +118,9 @@ void __cpuinit smp_callin(void)
while (!cpu_isset(cpuid, smp_commenced_mask))
rmb();
- spin_lock(&call_lock);
+ ipi_call_lock();
cpu_set(cpuid, cpu_online_map);
- spin_unlock(&call_lock);
+ ipi_call_unlock();
/* idle thread is expected to have preempt disabled */
preempt_disable();
@@ -1305,10 +1303,6 @@ int __cpu_disable(void)
c->core_id = 0;
c->proc_id = -1;
- spin_lock(&call_lock);
- cpu_clear(cpu, cpu_online_map);
- spin_unlock(&call_lock);
-
smp_wmb();
/* Make sure no interrupts point to this cpu. */
@@ -1318,6 +1312,10 @@ int __cpu_disable(void)
mdelay(1);
local_irq_disable();
+ ipi_call_lock();
+ cpu_clear(cpu, cpu_online_map);
+ ipi_call_unlock();
+
return 0;
}
OpenPOWER on IntegriCloud