diff options
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index c0cd255fddbd..65b52320d145 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -22,23 +22,23 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | |||
26 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
27 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
28 | #include <linux/kernel_stat.h> | 27 | #include <linux/kernel_stat.h> |
29 | #include <linux/smp_lock.h> | 28 | #include <linux/smp_lock.h> |
30 | |||
31 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
32 | #include <linux/cache.h> | 30 | #include <linux/cache.h> |
33 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
34 | #include <linux/cpu.h> | 32 | #include <linux/cpu.h> |
35 | 33 | #include <linux/timex.h> | |
34 | #include <asm/setup.h> | ||
36 | #include <asm/sigp.h> | 35 | #include <asm/sigp.h> |
37 | #include <asm/pgalloc.h> | 36 | #include <asm/pgalloc.h> |
38 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
39 | #include <asm/s390_ext.h> | 38 | #include <asm/s390_ext.h> |
40 | #include <asm/cpcmd.h> | 39 | #include <asm/cpcmd.h> |
41 | #include <asm/tlbflush.h> | 40 | #include <asm/tlbflush.h> |
41 | #include <asm/timer.h> | ||
42 | 42 | ||
43 | extern volatile int __cpu_logical_map[]; | 43 | extern volatile int __cpu_logical_map[]; |
44 | 44 | ||
@@ -53,12 +53,6 @@ cpumask_t cpu_possible_map = CPU_MASK_NONE; | |||
53 | 53 | ||
54 | static struct task_struct *current_set[NR_CPUS]; | 54 | static struct task_struct *current_set[NR_CPUS]; |
55 | 55 | ||
56 | /* | ||
57 | * Reboot, halt and power_off routines for SMP. | ||
58 | */ | ||
59 | extern char vmhalt_cmd[]; | ||
60 | extern char vmpoff_cmd[]; | ||
61 | |||
62 | static void smp_ext_bitcall(int, ec_bit_sig); | 56 | static void smp_ext_bitcall(int, ec_bit_sig); |
63 | static void smp_ext_bitcall_others(ec_bit_sig); | 57 | static void smp_ext_bitcall_others(ec_bit_sig); |
64 | 58 | ||
@@ -200,7 +194,7 @@ int smp_call_function_on(void (*func) (void *info), void *info, | |||
200 | } | 194 | } |
201 | EXPORT_SYMBOL(smp_call_function_on); | 195 | EXPORT_SYMBOL(smp_call_function_on); |
202 | 196 | ||
203 | static inline void do_send_stop(void) | 197 | static void do_send_stop(void) |
204 | { | 198 | { |
205 | int cpu, rc; | 199 | int cpu, rc; |
206 | 200 | ||
@@ -214,7 +208,7 @@ static inline void do_send_stop(void) | |||
214 | } | 208 | } |
215 | } | 209 | } |
216 | 210 | ||
217 | static inline void do_store_status(void) | 211 | static void do_store_status(void) |
218 | { | 212 | { |
219 | int cpu, rc; | 213 | int cpu, rc; |
220 | 214 | ||
@@ -230,7 +224,7 @@ static inline void do_store_status(void) | |||
230 | } | 224 | } |
231 | } | 225 | } |
232 | 226 | ||
233 | static inline void do_wait_for_stop(void) | 227 | static void do_wait_for_stop(void) |
234 | { | 228 | { |
235 | int cpu; | 229 | int cpu; |
236 | 230 | ||
@@ -250,7 +244,7 @@ static inline void do_wait_for_stop(void) | |||
250 | void smp_send_stop(void) | 244 | void smp_send_stop(void) |
251 | { | 245 | { |
252 | /* Disable all interrupts/machine checks */ | 246 | /* Disable all interrupts/machine checks */ |
253 | __load_psw_mask(PSW_KERNEL_BITS & ~PSW_MASK_MCHECK); | 247 | __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK); |
254 | 248 | ||
255 | /* write magic number to zero page (absolute 0) */ | 249 | /* write magic number to zero page (absolute 0) */ |
256 | lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC; | 250 | lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC; |
@@ -298,7 +292,7 @@ void machine_power_off_smp(void) | |||
298 | * cpus are handled. | 292 | * cpus are handled. |
299 | */ | 293 | */ |
300 | 294 | ||
301 | void do_ext_call_interrupt(__u16 code) | 295 | static void do_ext_call_interrupt(__u16 code) |
302 | { | 296 | { |
303 | unsigned long bits; | 297 | unsigned long bits; |
304 | 298 | ||
@@ -385,7 +379,7 @@ struct ec_creg_mask_parms { | |||
385 | /* | 379 | /* |
386 | * callback for setting/clearing control bits | 380 | * callback for setting/clearing control bits |
387 | */ | 381 | */ |
388 | void smp_ctl_bit_callback(void *info) { | 382 | static void smp_ctl_bit_callback(void *info) { |
389 | struct ec_creg_mask_parms *pp = info; | 383 | struct ec_creg_mask_parms *pp = info; |
390 | unsigned long cregs[16]; | 384 | unsigned long cregs[16]; |
391 | int i; | 385 | int i; |
@@ -458,17 +452,15 @@ __init smp_count_cpus(void) | |||
458 | /* | 452 | /* |
459 | * Activate a secondary processor. | 453 | * Activate a secondary processor. |
460 | */ | 454 | */ |
461 | extern void init_cpu_timer(void); | ||
462 | extern void init_cpu_vtimer(void); | ||
463 | |||
464 | int __devinit start_secondary(void *cpuvoid) | 455 | int __devinit start_secondary(void *cpuvoid) |
465 | { | 456 | { |
466 | /* Setup the cpu */ | 457 | /* Setup the cpu */ |
467 | cpu_init(); | 458 | cpu_init(); |
468 | preempt_disable(); | 459 | preempt_disable(); |
469 | /* init per CPU timer */ | 460 | /* Enable TOD clock interrupts on the secondary cpu. */ |
470 | init_cpu_timer(); | 461 | init_cpu_timer(); |
471 | #ifdef CONFIG_VIRT_TIMER | 462 | #ifdef CONFIG_VIRT_TIMER |
463 | /* Enable cpu timer interrupts on the secondary cpu. */ | ||
472 | init_cpu_vtimer(); | 464 | init_cpu_vtimer(); |
473 | #endif | 465 | #endif |
474 | /* Enable pfault pseudo page faults on this cpu. */ | 466 | /* Enable pfault pseudo page faults on this cpu. */ |
@@ -542,7 +534,7 @@ smp_put_cpu(int cpu) | |||
542 | spin_unlock_irqrestore(&smp_reserve_lock, flags); | 534 | spin_unlock_irqrestore(&smp_reserve_lock, flags); |
543 | } | 535 | } |
544 | 536 | ||
545 | static inline int | 537 | static int |
546 | cpu_stopped(int cpu) | 538 | cpu_stopped(int cpu) |
547 | { | 539 | { |
548 | __u32 status; | 540 | __u32 status; |