aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 0aeb290060d9..5d4fa4b1c74c 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -139,7 +139,6 @@ static void __smp_call_function_map(void (*func) (void *info), void *info,
139 if (wait) 139 if (wait)
140 data.finished = CPU_MASK_NONE; 140 data.finished = CPU_MASK_NONE;
141 141
142 spin_lock(&call_lock);
143 call_data = &data; 142 call_data = &data;
144 143
145 for_each_cpu_mask(cpu, map) 144 for_each_cpu_mask(cpu, map)
@@ -151,7 +150,6 @@ static void __smp_call_function_map(void (*func) (void *info), void *info,
151 if (wait) 150 if (wait)
152 while (!cpus_equal(map, data.finished)) 151 while (!cpus_equal(map, data.finished))
153 cpu_relax(); 152 cpu_relax();
154 spin_unlock(&call_lock);
155out: 153out:
156 if (local) { 154 if (local) {
157 local_irq_disable(); 155 local_irq_disable();
@@ -177,11 +175,11 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
177{ 175{
178 cpumask_t map; 176 cpumask_t map;
179 177
180 preempt_disable(); 178 spin_lock(&call_lock);
181 map = cpu_online_map; 179 map = cpu_online_map;
182 cpu_clear(smp_processor_id(), map); 180 cpu_clear(smp_processor_id(), map);
183 __smp_call_function_map(func, info, nonatomic, wait, map); 181 __smp_call_function_map(func, info, nonatomic, wait, map);
184 preempt_enable(); 182 spin_unlock(&call_lock);
185 return 0; 183 return 0;
186} 184}
187EXPORT_SYMBOL(smp_call_function); 185EXPORT_SYMBOL(smp_call_function);
@@ -202,10 +200,10 @@ EXPORT_SYMBOL(smp_call_function);
202int smp_call_function_single(int cpu, void (*func) (void *info), void *info, 200int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
203 int nonatomic, int wait) 201 int nonatomic, int wait)
204{ 202{
205 preempt_disable(); 203 spin_lock(&call_lock);
206 __smp_call_function_map(func, info, nonatomic, wait, 204 __smp_call_function_map(func, info, nonatomic, wait,
207 cpumask_of_cpu(cpu)); 205 cpumask_of_cpu(cpu));
208 preempt_enable(); 206 spin_unlock(&call_lock);
209 return 0; 207 return 0;
210} 208}
211EXPORT_SYMBOL(smp_call_function_single); 209EXPORT_SYMBOL(smp_call_function_single);
@@ -228,10 +226,10 @@ EXPORT_SYMBOL(smp_call_function_single);
228int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, 226int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
229 int wait) 227 int wait)
230{ 228{
231 preempt_disable(); 229 spin_lock(&call_lock);
232 cpu_clear(smp_processor_id(), mask); 230 cpu_clear(smp_processor_id(), mask);
233 __smp_call_function_map(func, info, 0, wait, mask); 231 __smp_call_function_map(func, info, 0, wait, mask);
234 preempt_enable(); 232 spin_unlock(&call_lock);
235 return 0; 233 return 0;
236} 234}
237EXPORT_SYMBOL(smp_call_function_mask); 235EXPORT_SYMBOL(smp_call_function_mask);
@@ -592,7 +590,9 @@ int __cpuinit start_secondary(void *cpuvoid)
592 pfault_init(); 590 pfault_init();
593 591
594 /* Mark this cpu as online */ 592 /* Mark this cpu as online */
593 spin_lock(&call_lock);
595 cpu_set(smp_processor_id(), cpu_online_map); 594 cpu_set(smp_processor_id(), cpu_online_map);
595 spin_unlock(&call_lock);
596 /* Switch on interrupts */ 596 /* Switch on interrupts */
597 local_irq_enable(); 597 local_irq_enable();
598 /* Print info about this processor */ 598 /* Print info about this processor */
@@ -711,7 +711,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
711 memset(sf, 0, sizeof(struct stack_frame)); 711 memset(sf, 0, sizeof(struct stack_frame));
712 sf->gprs[9] = (unsigned long) sf; 712 sf->gprs[9] = (unsigned long) sf;
713 cpu_lowcore->save_area[15] = (unsigned long) sf; 713 cpu_lowcore->save_area[15] = (unsigned long) sf;
714 __ctl_store(cpu_lowcore->cregs_save_area[0], 0, 15); 714 __ctl_store(cpu_lowcore->cregs_save_area, 0, 15);
715 asm volatile( 715 asm volatile(
716 " stam 0,15,0(%0)" 716 " stam 0,15,0(%0)"
717 : : "a" (&cpu_lowcore->access_regs_save_area) : "memory"); 717 : : "a" (&cpu_lowcore->access_regs_save_area) : "memory");
@@ -1089,7 +1089,7 @@ out:
1089 1089
1090#ifdef CONFIG_HOTPLUG_CPU 1090#ifdef CONFIG_HOTPLUG_CPU
1091 1091
1092int smp_rescan_cpus(void) 1092int __ref smp_rescan_cpus(void)
1093{ 1093{
1094 cpumask_t newcpus; 1094 cpumask_t newcpus;
1095 int cpu; 1095 int cpu;