aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-12-04 09:40:40 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-04 09:40:40 -0500
commit29b08d2bae854f66d3cfd5f57aaf2e7c2c7fce32 (patch)
tree1a907c124f6a12ec4617a030e412a01be4c81b04 /arch/s390/kernel
parent36a2bd425d9b3ba2a40b0653e08d17702c78558e (diff)
[S390] pfault code cleanup.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/machine_kexec.c8
-rw-r--r--arch/s390/kernel/smp.c13
-rw-r--r--arch/s390/kernel/traps.c25
3 files changed, 5 insertions, 41 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index def5caf8f72f..f6d9bcc0f75b 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -49,18 +49,12 @@ void machine_shutdown(void)
49 printk(KERN_INFO "kexec: machine_shutdown called\n"); 49 printk(KERN_INFO "kexec: machine_shutdown called\n");
50} 50}
51 51
52extern void pfault_fini(void);
53
54void machine_kexec(struct kimage *image) 52void machine_kexec(struct kimage *image)
55{ 53{
56 relocate_kernel_t data_mover; 54 relocate_kernel_t data_mover;
57 55
58 preempt_disable();
59#ifdef CONFIG_PFAULT
60 if (MACHINE_IS_VM)
61 pfault_fini();
62#endif
63 smp_send_stop(); 56 smp_send_stop();
57 pfault_fini();
64 s390_reset_system(); 58 s390_reset_system();
65 59
66 data_mover = (relocate_kernel_t) page_to_phys(image->control_code_page); 60 data_mover = (relocate_kernel_t) page_to_phys(image->control_code_page);
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index b549a43ed08f..19090f7d4f51 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -460,8 +460,6 @@ __init smp_count_cpus(void)
460 */ 460 */
461extern void init_cpu_timer(void); 461extern void init_cpu_timer(void);
462extern void init_cpu_vtimer(void); 462extern void init_cpu_vtimer(void);
463extern int pfault_init(void);
464extern void pfault_fini(void);
465 463
466int __devinit start_secondary(void *cpuvoid) 464int __devinit start_secondary(void *cpuvoid)
467{ 465{
@@ -473,11 +471,9 @@ int __devinit start_secondary(void *cpuvoid)
473#ifdef CONFIG_VIRT_TIMER 471#ifdef CONFIG_VIRT_TIMER
474 init_cpu_vtimer(); 472 init_cpu_vtimer();
475#endif 473#endif
476#ifdef CONFIG_PFAULT
477 /* Enable pfault pseudo page faults on this cpu. */ 474 /* Enable pfault pseudo page faults on this cpu. */
478 if (MACHINE_IS_VM) 475 pfault_init();
479 pfault_init(); 476
480#endif
481 /* Mark this cpu as online */ 477 /* Mark this cpu as online */
482 cpu_set(smp_processor_id(), cpu_online_map); 478 cpu_set(smp_processor_id(), cpu_online_map);
483 /* Switch on interrupts */ 479 /* Switch on interrupts */
@@ -667,11 +663,8 @@ __cpu_disable(void)
667 } 663 }
668 cpu_clear(cpu, cpu_online_map); 664 cpu_clear(cpu, cpu_online_map);
669 665
670#ifdef CONFIG_PFAULT
671 /* Disable pfault pseudo page faults on this cpu. */ 666 /* Disable pfault pseudo page faults on this cpu. */
672 if (MACHINE_IS_VM) 667 pfault_fini();
673 pfault_fini();
674#endif
675 668
676 memset(&cr_parms.orvals, 0, sizeof(cr_parms.orvals)); 669 memset(&cr_parms.orvals, 0, sizeof(cr_parms.orvals));
677 memset(&cr_parms.andvals, 0xff, sizeof(cr_parms.andvals)); 670 memset(&cr_parms.andvals, 0xff, sizeof(cr_parms.andvals));
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 92ecffbc8d82..475dbb884430 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -58,12 +58,6 @@ int sysctl_userprocess_debug = 0;
58 58
59extern pgm_check_handler_t do_protection_exception; 59extern pgm_check_handler_t do_protection_exception;
60extern pgm_check_handler_t do_dat_exception; 60extern pgm_check_handler_t do_dat_exception;
61#ifdef CONFIG_PFAULT
62extern int pfault_init(void);
63extern void pfault_fini(void);
64extern void pfault_interrupt(__u16 error_code);
65static ext_int_info_t ext_int_pfault;
66#endif
67extern pgm_check_handler_t do_monitor_call; 61extern pgm_check_handler_t do_monitor_call;
68 62
69#define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; }) 63#define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; })
@@ -739,22 +733,5 @@ void __init trap_init(void)
739 pgm_check_table[0x1C] = &space_switch_exception; 733 pgm_check_table[0x1C] = &space_switch_exception;
740 pgm_check_table[0x1D] = &hfp_sqrt_exception; 734 pgm_check_table[0x1D] = &hfp_sqrt_exception;
741 pgm_check_table[0x40] = &do_monitor_call; 735 pgm_check_table[0x40] = &do_monitor_call;
742 736 pfault_irq_init();
743 if (MACHINE_IS_VM) {
744#ifdef CONFIG_PFAULT
745 /*
746 * Try to get pfault pseudo page faults going.
747 */
748 if (register_early_external_interrupt(0x2603, pfault_interrupt,
749 &ext_int_pfault) != 0)
750 panic("Couldn't request external interrupt 0x2603");
751
752 if (pfault_init() == 0)
753 return;
754
755 /* Tough luck, no pfault. */
756 unregister_early_external_interrupt(0x2603, pfault_interrupt,
757 &ext_int_pfault);
758#endif
759 }
760} 737}