aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorYong Zhang <yong.zhang0@gmail.com>2012-05-29 04:27:33 -0400
committerThomas Gleixner <tglx@linutronix.de>2012-06-05 11:27:13 -0400
commitbc6833009583bd5b096ef7aa2bb006854a5a2dce (patch)
treee4499ab9851f6f24d748e58889cc3c76dc57e420 /arch/sparc
parent459165e25030c0023cb54f73c14261a3d2f4a244 (diff)
SPARC: SMP: Remove call to ipi_call_lock_irq()/ipi_call_unlock_irq()
ipi_call_lock/unlock() lock resp. unlock call_function.lock. This lock protects only the call_function data structure itself, but it's completely unrelated to cpu_online_mask. The mask to which the IPIs are sent is calculated before call_function.lock is taken in smp_call_function_many(), so the locking around set_cpu_online() is pointless and can be removed. Delay irq enable to after set_cpu_online(). [ tglx: Massaged changelog ] Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Cc: ralf@linux-mips.org Cc: sshtylyov@mvista.com Cc: david.daney@cavium.com Cc: nikunj@linux.vnet.ibm.com Cc: paulmck@linux.vnet.ibm.com Cc: axboe@kernel.dk Cc: peterz@infradead.org Cc: sparclinux@vger.kernel.org Link: http://lkml.kernel.org/r/20120529082732.GA4250@zhy Acked-by: "David S. Miller" <davem@davemloft.net> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/smp_64.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index f591598d92f6..781bcb10b8bd 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -103,8 +103,6 @@ void __cpuinit smp_callin(void)
103 if (cheetah_pcache_forced_on) 103 if (cheetah_pcache_forced_on)
104 cheetah_enable_pcache(); 104 cheetah_enable_pcache();
105 105
106 local_irq_enable();
107
108 callin_flag = 1; 106 callin_flag = 1;
109 __asm__ __volatile__("membar #Sync\n\t" 107 __asm__ __volatile__("membar #Sync\n\t"
110 "flush %%g6" : : : "memory"); 108 "flush %%g6" : : : "memory");
@@ -124,9 +122,8 @@ void __cpuinit smp_callin(void)
124 while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) 122 while (!cpumask_test_cpu(cpuid, &smp_commenced_mask))
125 rmb(); 123 rmb();
126 124
127 ipi_call_lock_irq();
128 set_cpu_online(cpuid, true); 125 set_cpu_online(cpuid, true);
129 ipi_call_unlock_irq(); 126 local_irq_enable();
130 127
131 /* idle thread is expected to have preempt disabled */ 128 /* idle thread is expected to have preempt disabled */
132 preempt_disable(); 129 preempt_disable();
@@ -1308,9 +1305,7 @@ int __cpu_disable(void)
1308 mdelay(1); 1305 mdelay(1);
1309 local_irq_disable(); 1306 local_irq_disable();
1310 1307
1311 ipi_call_lock();
1312 set_cpu_online(cpu, false); 1308 set_cpu_online(cpu, false);
1313 ipi_call_unlock();
1314 1309
1315 cpu_map_rebuild(); 1310 cpu_map_rebuild();
1316 1311