s390: kexec fixes for -mm
PATCH 1/1 s390: kexec fixes for -mm
Hi Andrew,
could you please add the patch below to your mm tree? It fixes some issues with the current kexec implementation on s390. This one needs to be applied after kexec-s390-support.patch.
Thanks,
Heiko
From: Heiko Carstens <[email protected]>
This patch is mostly based on comments which I received from Milton Miller <[email protected]>. Changes are:
- Fix passing of first argument to relocate_kernel assembly.
- Fix Kconfig description.
- Remove wrong comment and comments that describe obvious things.
- Allow only KEXEC_TYPE_DEFAULT as image type -> dump not supported.
Signed-off-by Heiko Carstens <[email protected]>
diffstat:
arch/s390/Kconfig | 14 -------- arch/s390/kernel/machine_kexec.c | 61 ++++++++--------------------------- arch/s390/kernel/relocate_kernel.S | 14 +++----- arch/s390/kernel/relocate_kernel64.S | 14 +++----- 4 files changed, 27 insertions(+), 76 deletions(-)
arch/s390/Kconfig +1 -13
@@ -461,19 +461,7 @@ help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot - but it is indepedent of the system firmware. And like a reboot - you can start any kernel with it, not just Linux. - - The name comes from the similiarity to the exec system call. - - It is an ongoing process to be certain the hardware in a machine - is properly shutdown, so do not be surprised if this code does not - initially work for you. It may help to enable device hotplugging - support. As of this writing the exact hardware interface is - strongly in flux, so no good recommendation can be made. - - In the GAMECUBE implementation, kexec allows you to load and - run DOL files, including kernel and homebrew DOLs. + but is independent of hardware/microcode support. endmenu
arch/s390/kernel/machine_kexec.c +14 -47
114 lines not on this page · raw message
arch/s390/kernel/relocate_kernel64.S +6 -8
@@ -9,9 +9,8 @@ /* * moves the new kernel to its destination... - * %r2 = indirection page - * %r3 = reboot_code_buffer - * %r4 = start address - where to jump to after the job is done... + * %r2 = pointer to first kimage_entry_t + * %r3 = start address - where to jump to after the job is done... * * %r5 will be used as temp. storage * %r6 holds the destination address
@@ -59,11 +58,10 @@ j .top .done: sgr %r0,%r0 #clear register r0 - la %r3,load_psw-.base(%r13) #load psw-address into the register - mvc 0(4,%r0),0(%r3) #copy the first part of it - l %r1,4(0,%r3) #copy the second part of load_psw in %r1 - or %r1,%r4 #OR it with the given psw --> %r1 = (%r1 | %r4) - st %r1,4(0,%r0) #store it at addr 0+4B, i.e. second part of psw + la %r4,load_psw-.base(%r13) #load psw-address into the register + o %r3,4(%r4) #or load address into psw + st %r3,4(%r4) + mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 sam31 #31 bit mode sr %r1,%r1 #erase register r1 sr %r2,%r2 #erase register r2
arch/s390/kernel/relocate_kernel.S +6 -8
@@ -9,9 +9,8 @@ /* * moves the new kernel to its destination... - * %r2 = indirection page - * %r3 = reboot_code_buffer - * %r4 = start address - where to jump to after the job is done... + * %r2 = pointer to first kimage_entry_t + * %r3 = start address - where to jump to after the job is done... * * %r5 will be used as temp. storage * %r6 holds the destination address
@@ -60,11 +59,10 @@ j .top .done: sr %r0,%r0 #clear register r0 - la %r3,load_psw-.base(%r13) #load psw-address into the register - mvc 0(4,%r0),0(%r3) #copy the first part of psw - l %r1,4(0,%r3) #get the second part of psw in %r1 - or %r1,%r4 #OR the load address with the 2nd part of psw - st %r1,4(0,%r0) #store it at add 0+4B + la %r4,load_psw-.base(%r13) #load psw-address into the register + o %r3,4(%r4) #or load address into psw + st %r3,4(%r4) + mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 sr %r1,%r1 #clear %r1 sr %r2,%r2 #clear %r2 sigp %r1,%r2,0x12 #set cpuid to zero