diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2012-05-21 05:30:30 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-05-23 11:06:51 -0400 |
commit | fa7c0043425624ed65b94a6fabe750c7b0af8719 (patch) | |
tree | 8e21c28d65b56a0bd22af1b9a196083233341b3c /arch/s390/kernel/base.S | |
parent | a9fbf1a53836d4105f95df947ac00e22311dff33 (diff) |
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 <schwidefsky@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/base.S')
-rw-r--r-- | arch/s390/kernel/base.S | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/s390/kernel/base.S b/arch/s390/kernel/base.S index 3aa4d00aaf50..c880ff72db44 100644 --- a/arch/s390/kernel/base.S +++ b/arch/s390/kernel/base.S | |||
@@ -88,6 +88,9 @@ ENTRY(diag308_reset) | |||
88 | stctg %c0,%c15,0(%r4) | 88 | stctg %c0,%c15,0(%r4) |
89 | larl %r4,.Lfpctl # Floating point control register | 89 | larl %r4,.Lfpctl # Floating point control register |
90 | stfpc 0(%r4) | 90 | stfpc 0(%r4) |
91 | larl %r4,.Lcontinue_psw # Save PSW flags | ||
92 | epsw %r2,%r3 | ||
93 | stm %r2,%r3,0(%r4) | ||
91 | larl %r4,.Lrestart_psw # Setup restart PSW at absolute 0 | 94 | larl %r4,.Lrestart_psw # Setup restart PSW at absolute 0 |
92 | lghi %r3,0 | 95 | lghi %r3,0 |
93 | lg %r4,0(%r4) # Save PSW | 96 | lg %r4,0(%r4) # Save PSW |
@@ -103,11 +106,20 @@ ENTRY(diag308_reset) | |||
103 | lctlg %c0,%c15,0(%r4) | 106 | lctlg %c0,%c15,0(%r4) |
104 | larl %r4,.Lfpctl # Restore floating point ctl register | 107 | larl %r4,.Lfpctl # Restore floating point ctl register |
105 | lfpc 0(%r4) | 108 | lfpc 0(%r4) |
109 | larl %r4,.Lcontinue_psw # Restore PSW flags | ||
110 | lpswe 0(%r4) | ||
111 | .Lcontinue: | ||
106 | br %r14 | 112 | br %r14 |
107 | .align 16 | 113 | .align 16 |
108 | .Lrestart_psw: | 114 | .Lrestart_psw: |
109 | .long 0x00080000,0x80000000 + .Lrestart_part2 | 115 | .long 0x00080000,0x80000000 + .Lrestart_part2 |
110 | 116 | ||
117 | .section .data..nosave,"aw",@progbits | ||
118 | .align 8 | ||
119 | .Lcontinue_psw: | ||
120 | .quad 0,.Lcontinue | ||
121 | .previous | ||
122 | |||
111 | .section .bss | 123 | .section .bss |
112 | .align 8 | 124 | .align 8 |
113 | .Lctlregs: | 125 | .Lctlregs: |