Skip to content

Commit 213400c

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/nmi: Simplify ptregs setup
The low level machine check handler code fills the ptregs structure partially with the register contents present at machine check handler entry and partially with contents from the machine check save area. In case of a machine check the contents of all general purpose registers are saved by the CPU to the machine check save area. Therefore simplify the code and fill the ptregs structure by only using the machine check save area as source. Signed-off-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>
1 parent beb8cee commit 213400c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

arch/s390/kernel/entry.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ SYM_CODE_START(mcck_int_handler)
491491
stctg %c1,%c1,__PT_CR1(%r11)
492492
lctlg %c1,%c1,__LC_KERNEL_ASCE
493493
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
494-
lghi %r14,__LC_GPREGS_SAVE_AREA+64
495-
stmg %r0,%r7,__PT_R0(%r11)
494+
lghi %r14,__LC_GPREGS_SAVE_AREA
495+
mvc __PT_R0(128,%r11),0(%r14)
496496
# clear user controlled registers to prevent speculative use
497497
xgr %r0,%r0
498498
xgr %r1,%r1
@@ -502,7 +502,6 @@ SYM_CODE_START(mcck_int_handler)
502502
xgr %r6,%r6
503503
xgr %r7,%r7
504504
xgr %r10,%r10
505-
mvc __PT_R8(64,%r11),0(%r14)
506505
stmg %r8,%r9,__PT_PSW(%r11)
507506
xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
508507
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)

0 commit comments

Comments
 (0)