diff options
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 0aeb290060d9..42b1d12ebb10 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); | ||
155 | out: | 153 | out: |
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 | } |
187 | EXPORT_SYMBOL(smp_call_function); | 185 | EXPORT_SYMBOL(smp_call_function); |
@@ -202,10 +200,10 @@ EXPORT_SYMBOL(smp_call_function); | |||
202 | int smp_call_function_single(int cpu, void (*func) (void *info), void *info, | 200 | int 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 | } |
211 | EXPORT_SYMBOL(smp_call_function_single); | 209 | EXPORT_SYMBOL(smp_call_function_single); |
@@ -228,10 +226,10 @@ EXPORT_SYMBOL(smp_call_function_single); | |||
228 | int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, | 226 | int 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 | } |
237 | EXPORT_SYMBOL(smp_call_function_mask); | 235 | EXPORT_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 */ |
@@ -1089,7 +1089,7 @@ out: | |||
1089 | 1089 | ||
1090 | #ifdef CONFIG_HOTPLUG_CPU | 1090 | #ifdef CONFIG_HOTPLUG_CPU |
1091 | 1091 | ||
1092 | int smp_rescan_cpus(void) | 1092 | int __ref smp_rescan_cpus(void) |
1093 | { | 1093 | { |
1094 | cpumask_t newcpus; | 1094 | cpumask_t newcpus; |
1095 | int cpu; | 1095 | int cpu; |