Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/kdump: Make kdump ready for lowcore relocation

In preparation of having lowcore at different address than zero,
add the base register to all lowcore accesses in store_status()
and __do_machine_kdump().

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Sven Schnelle and committed by
Vasily Gorbik
97cee3dd 361f6ec2

+12 -16
+1 -1
arch/s390/kernel/machine_kexec.c
··· 62 62 * This need to be done *after* s390_reset_system set the 63 63 * prefix register of this CPU to zero 64 64 */ 65 - memcpy(absolute_pointer(__LC_FPREGS_SAVE_AREA), 65 + memcpy(absolute_pointer(get_lowcore()->floating_pt_save_area), 66 66 phys_to_virt(prefix + __LC_FPREGS_SAVE_AREA), 512); 67 67 68 68 call_nodat(1, int, purgatory, int, 1);
+11 -15
arch/s390/kernel/reipl.S
··· 9 9 #include <asm/asm-offsets.h> 10 10 #include <asm/nospec-insn.h> 11 11 #include <asm/sigp.h> 12 + #include <asm/lowcore.h> 12 13 13 14 GEN_BR_THUNK %r9 14 15 ··· 21 20 # r3 = Parameter for function 22 21 # 23 22 SYM_CODE_START(store_status) 24 - /* Save register one and load save area base */ 25 - stg %r1,__LC_SAVE_AREA_RESTART 23 + STMG_LC %r0,%r15,__LC_GPREGS_SAVE_AREA 26 24 /* General purpose registers */ 27 - lghi %r1,__LC_GPREGS_SAVE_AREA 28 - stmg %r0,%r15,0(%r1) 29 - mvc 8(8,%r1),__LC_SAVE_AREA_RESTART 25 + GET_LC %r13 30 26 /* Control registers */ 31 - lghi %r1,__LC_CREGS_SAVE_AREA 32 - stctg %c0,%c15,0(%r1) 27 + stctg %c0,%c15,__LC_CREGS_SAVE_AREA(%r13) 33 28 /* Access registers */ 34 - lghi %r1,__LC_AREGS_SAVE_AREA 35 - stam %a0,%a15,0(%r1) 29 + stamy %a0,%a15,__LC_AREGS_SAVE_AREA(%r13) 36 30 /* Floating point registers */ 37 - lghi %r1,__LC_FPREGS_SAVE_AREA 31 + lay %r1,__LC_FPREGS_SAVE_AREA(%r13) 38 32 std %f0, 0x00(%r1) 39 33 std %f1, 0x08(%r1) 40 34 std %f2, 0x10(%r1) ··· 47 51 std %f14,0x70(%r1) 48 52 std %f15,0x78(%r1) 49 53 /* Floating point control register */ 50 - lghi %r1,__LC_FP_CREG_SAVE_AREA 54 + lay %r1,__LC_FP_CREG_SAVE_AREA(%r13) 51 55 stfpc 0(%r1) 52 56 /* CPU timer */ 53 - lghi %r1,__LC_CPU_TIMER_SAVE_AREA 57 + lay %r1,__LC_CPU_TIMER_SAVE_AREA(%r13) 54 58 stpt 0(%r1) 55 59 /* Store prefix register */ 56 - lghi %r1,__LC_PREFIX_SAVE_AREA 60 + lay %r1,__LC_PREFIX_SAVE_AREA(%r13) 57 61 stpx 0(%r1) 58 62 /* Clock comparator - seven bytes */ 59 - lghi %r1,__LC_CLOCK_COMP_SAVE_AREA 60 63 larl %r4,clkcmp 61 64 stckc 0(%r4) 65 + lay %r1,__LC_CLOCK_COMP_SAVE_AREA(%r13) 62 66 mvc 1(7,%r1),1(%r4) 63 67 /* Program status word */ 64 - lghi %r1,__LC_PSW_SAVE_AREA 68 + lay %r1,__LC_PSW_SAVE_AREA(%r13) 65 69 epsw %r4,%r5 66 70 st %r4,0(%r1) 67 71 st %r5,4(%r1)