Skip to content

Commit edbe289

Browse files
author
Alexander Gordeev
committed
s390/entry: rework entering DAT-on mode on CPU restart
Instead of enforcing PSW_MASK_DAT bit on previously stored in lowcore restart_psw.mask use the PSW_KERNEL_BITS mask (which contains PSW_MASK_DAT) directly. As result, the PSW mask stored in lowcore is only used to enter the CPU restart routine, while PSW_KERNEL_BITS is used to enter the kernel code - similarily to commit 64ea2977add2 ("s390/mm: start kernel with DAT enabled"). Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
1 parent b492425 commit edbe289

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

arch/s390/kernel/entry.S

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,9 @@ SYM_CODE_START(restart_int_handler)
598598
TSTMSK __LC_RESTART_FLAGS,RESTART_FLAG_CTLREGS,4
599599
jz 0f
600600
lctlg %c0,%c15,__LC_CREGS_SAVE_AREA
601-
0: larl %r15,stosm_tmp
602-
stosm 0(%r15),0x04 # turn dat on, keep irqs off
601+
0: larl %r15,daton_psw
602+
lpswe 0(%r15) # turn dat on, keep irqs off
603+
.Ldaton:
603604
lg %r15,__LC_RESTART_STACK
604605
xc STACK_FRAME_OVERHEAD(__PT_SIZE,%r15),STACK_FRAME_OVERHEAD(%r15)
605606
stmg %r0,%r14,STACK_FRAME_OVERHEAD+__PT_R0(%r15)
@@ -646,7 +647,11 @@ SYM_CODE_END(stack_overflow)
646647
.balign 4
647648
SYM_DATA_LOCAL(stop_lock, .long 0)
648649
SYM_DATA_LOCAL(this_cpu, .short 0)
649-
SYM_DATA_LOCAL(stosm_tmp, .byte 0)
650+
.balign 8
651+
SYM_DATA_START_LOCAL(daton_psw)
652+
.quad PSW_KERNEL_BITS
653+
.quad .Ldaton
654+
SYM_DATA_END(daton_psw)
650655

651656
.section .rodata, "a"
652657
#define SYSCALL(esame,emu) .quad __s390x_ ## esame

0 commit comments

Comments
 (0)