diff options
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 1d55c95f617..07f73cde90b 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -452,23 +452,21 @@ out: | |||
452 | */ | 452 | */ |
453 | int __cpuinit start_secondary(void *cpuvoid) | 453 | int __cpuinit start_secondary(void *cpuvoid) |
454 | { | 454 | { |
455 | /* Setup the cpu */ | ||
456 | cpu_init(); | 455 | cpu_init(); |
457 | preempt_disable(); | 456 | preempt_disable(); |
458 | /* Enable TOD clock interrupts on the secondary cpu. */ | ||
459 | init_cpu_timer(); | 457 | init_cpu_timer(); |
460 | /* Enable cpu timer interrupts on the secondary cpu. */ | ||
461 | init_cpu_vtimer(); | 458 | init_cpu_vtimer(); |
462 | /* Enable pfault pseudo page faults on this cpu. */ | ||
463 | pfault_init(); | 459 | pfault_init(); |
464 | 460 | ||
465 | /* call cpu notifiers */ | ||
466 | notify_cpu_starting(smp_processor_id()); | 461 | notify_cpu_starting(smp_processor_id()); |
467 | /* Mark this cpu as online */ | ||
468 | ipi_call_lock(); | 462 | ipi_call_lock(); |
469 | set_cpu_online(smp_processor_id(), true); | 463 | set_cpu_online(smp_processor_id(), true); |
470 | ipi_call_unlock(); | 464 | ipi_call_unlock(); |
471 | /* Switch on interrupts */ | 465 | __ctl_clear_bit(0, 28); /* Disable lowcore protection */ |
466 | S390_lowcore.restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; | ||
467 | S390_lowcore.restart_psw.addr = | ||
468 | PSW_ADDR_AMODE | (unsigned long) psw_restart_int_handler; | ||
469 | __ctl_set_bit(0, 28); /* Enable lowcore protection */ | ||
472 | local_irq_enable(); | 470 | local_irq_enable(); |
473 | /* cpu_idle will call schedule for us */ | 471 | /* cpu_idle will call schedule for us */ |
474 | cpu_idle(); | 472 | cpu_idle(); |
@@ -507,7 +505,11 @@ static int __cpuinit smp_alloc_lowcore(int cpu) | |||
507 | memset((char *)lowcore + 512, 0, sizeof(*lowcore) - 512); | 505 | memset((char *)lowcore + 512, 0, sizeof(*lowcore) - 512); |
508 | lowcore->async_stack = async_stack + ASYNC_SIZE; | 506 | lowcore->async_stack = async_stack + ASYNC_SIZE; |
509 | lowcore->panic_stack = panic_stack + PAGE_SIZE; | 507 | lowcore->panic_stack = panic_stack + PAGE_SIZE; |
510 | 508 | lowcore->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; | |
509 | lowcore->restart_psw.addr = | ||
510 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; | ||
511 | if (user_mode != HOME_SPACE_MODE) | ||
512 | lowcore->restart_psw.mask |= PSW_ASC_HOME; | ||
511 | #ifndef CONFIG_64BIT | 513 | #ifndef CONFIG_64BIT |
512 | if (MACHINE_HAS_IEEE) { | 514 | if (MACHINE_HAS_IEEE) { |
513 | unsigned long save_area; | 515 | unsigned long save_area; |
@@ -654,7 +656,8 @@ int __cpu_disable(void) | |||
654 | /* disable all external interrupts */ | 656 | /* disable all external interrupts */ |
655 | cr_parms.orvals[0] = 0; | 657 | cr_parms.orvals[0] = 0; |
656 | cr_parms.andvals[0] = ~(1 << 15 | 1 << 14 | 1 << 13 | 1 << 11 | | 658 | cr_parms.andvals[0] = ~(1 << 15 | 1 << 14 | 1 << 13 | 1 << 11 | |
657 | 1 << 10 | 1 << 9 | 1 << 6 | 1 << 4); | 659 | 1 << 10 | 1 << 9 | 1 << 6 | 1 << 5 | |
660 | 1 << 4); | ||
658 | /* disable all I/O interrupts */ | 661 | /* disable all I/O interrupts */ |
659 | cr_parms.orvals[6] = 0; | 662 | cr_parms.orvals[6] = 0; |
660 | cr_parms.andvals[6] = ~(1 << 31 | 1 << 30 | 1 << 29 | 1 << 28 | | 663 | cr_parms.andvals[6] = ~(1 << 31 | 1 << 30 | 1 << 29 | 1 << 28 | |