From fa7c0043425624ed65b94a6fabe750c7b0af8719 Mon Sep 17 00:00:00 2001 From: Michael Holzheu Date: Mon, 21 May 2012 11:30:30 +0200 Subject: s390/kdump: Use real mode for PSW restart and kexec Currently the PSW restart handler and kexec are executed in real mode with DAT=off. For kexec/kdump the function setup_regs() is called that uses the per-cpu variable "crash_notes". Because there are situations when the per-cpu implementation uses vmalloc memory, calling setup_regs() in real mode can cause a program check interrupt. To fix that problem this patch changes the following: * Ensure that diag308_reset() does not change PSW bits to real mode * Enable DAT in __do_restart() after we switched to an online CPU * Enable DAT in __machine_kexec() after we switched to the IPL CPU * Call setup_regs() before we switch to real mode and call purgatory Reviewed-by: Martin Schwidefsky Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/machine_kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/s390/kernel/machine_kexec.c') diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 03d2027d656..cdacf8f91b2 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -80,8 +80,8 @@ static void __do_machine_kdump(void *image) #ifdef CONFIG_CRASH_DUMP int (*start_kdump)(int) = (void *)((struct kimage *) image)->start; - __load_psw_mask(PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA); setup_regs(); + __load_psw_mask(PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA); start_kdump(1); #endif } @@ -214,6 +214,7 @@ static void __machine_kexec(void *data) { struct kimage *image = data; + __arch_local_irq_stosm(0x04); /* enable DAT */ pfault_fini(); tracing_off(); debug_locks_off(); -- cgit v1.2.3-70-g09d2