s390: kexec fixes and improvements.
PATCH 1/1 s390: kexec fixes and improvements.
From: Heiko Carstens <[email protected]>
Disable pseudo page fault handling before starting the new kernel and try to use diag308 to reset the machine.
Signed-off-by Heiko Carstens <[email protected]>
Signed-off-by Martin Schwidefsky <[email protected]>
diffstat:
arch/s390/kernel/machine_kexec.c | 7 +++++ arch/s390/kernel/relocate_kernel.S | 41 +++++++++++++++++++++++++++++++ arch/s390/kernel/relocate_kernel64.S | 45 +++++++++++++++++++++++++++++++++-- arch/s390/kernel/smp.c | 6 +++- arch/s390/kernel/traps.c | 15 +++++++++++ 5 files changed, 109 insertions(+), 5 deletions(-)
arch/s390/kernel/machine_kexec.c +7 -0
@@ -70,6 +70,8 @@for (;;); } +extern void pfault_fini (void ); +static void kexec_halt_all_cpus (void *kernel_image) {
@@ -78,6 +80,11 @@struct kimage *image;relocate_kernel_t data_mover; +#ifdef CONFIG_PFAULT +if (MACHINE_IS_VM ) +pfault_fini (); +#endif +if (atomic_compare_and_swap (-1 ,smp_processor_id (), &cpuid))signal_processor (smp_processor_id (), sigp_stop);
arch/s390/kernel/relocate_kernel64.S +43 -2
71 lines not on this page · raw message
arch/s390/kernel/relocate_kernel.S +40 -1
66 lines not on this page · raw message
arch/s390/kernel/smp.c +4 -2
@@ -537,7 +537,8 @@#endif #ifdef CONFIG_PFAULT /* Enable pfault pseudo page faults on this cpu. */ -pfault_init (); +if (MACHINE_IS_VM ) +pfault_init ();#endif /* Mark this cpu as online */ cpu_set (smp_processor_id (), cpu_online_map);
@@ -690,7 +691,8 @@#ifdef CONFIG_PFAULT /* Disable pfault pseudo page faults on this cpu. */ -pfault_fini (); +if (MACHINE_IS_VM ) +pfault_fini ();#endif /* disable all external interrupts */
arch/s390/kernel/traps.c +15 -0
@@ -29,6 +29,7 @@#include <linux/delay.h> #include <linux/module.h> #include <linux/kallsyms.h> +#include <linux/reboot.h> #include <asm/system.h> #include <asm/uaccess.h>
@@ -675,6 +676,19 @@panic ("Corrupt kernel stack, can't continue." ); } +#ifndef CONFIG_ARCH_S390X +static int +pagex_reboot_event (struct notifier_block *this,unsigned long event,void *ptr) +{ +if (MACHINE_IS_VM ) +cpcmd ("SET PAGEX OFF" ,NULL ,0 ,NULL ); +return NOTIFY_DONE ; +} + +static struct notifier_block pagex_reboot_notifier = { + .notifier_call = &pagex_reboot_event, +}; +#endif /* init is done in lowcore.S and head.S */
@@ -735,6 +749,7 @@ &ext_int_pfault);#endif #ifndef CONFIG_ARCH_S390X +register_reboot_notifier (&pagex_reboot_notifier);cpcmd ("SET PAGEX ON" ,NULL ,0 ,NULL );#endif }