Skip to content

Commit bd2c55b

Browse files
svens-s390Vasily Gorbik
authored andcommitted
s390/entry: Make int handlers ready for lowcore relocation
In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in the ext/io interrupt handlers. 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>
1 parent 9e1e275 commit bd2c55b

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

arch/s390/kernel/entry.S

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -395,26 +395,27 @@ SYM_CODE_END(pgm_check_handler)
395395
*/
396396
.macro INT_HANDLER name,lc_old_psw,handler
397397
SYM_CODE_START(\name)
398-
stckf __LC_INT_CLOCK
399-
stpt __LC_SYS_ENTER_TIMER
400-
STBEAR __LC_LAST_BREAK
398+
STMG_LC %r8,%r15,__LC_SAVE_AREA_ASYNC
399+
GET_LC %r13
400+
stckf __LC_INT_CLOCK(%r13)
401+
stpt __LC_SYS_ENTER_TIMER(%r13)
402+
STBEAR __LC_LAST_BREAK(%r13)
401403
BPOFF
402-
stmg %r8,%r15,__LC_SAVE_AREA_ASYNC
403-
lmg %r8,%r9,\lc_old_psw
404+
lmg %r8,%r9,\lc_old_psw(%r13)
404405
tmhh %r8,0x0001 # interrupting from user ?
405406
jnz 1f
406407
#if IS_ENABLED(CONFIG_KVM)
407-
lg %r10,__LC_CURRENT
408+
lg %r10,__LC_CURRENT(%r13)
408409
tm __TI_sie(%r10),0xff
409410
jz 0f
410411
BPENTER __SF_SIE_FLAGS(%r15),_TIF_ISOLATE_BP_GUEST
411-
SIEEXIT __SF_SIE_CONTROL(%r15),%r0
412+
SIEEXIT __SF_SIE_CONTROL(%r15),%r13
412413
#endif
413-
0: CHECK_STACK __LC_SAVE_AREA_ASYNC,%r0
414+
0: CHECK_STACK __LC_SAVE_AREA_ASYNC,%r13
414415
aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
415416
j 2f
416-
1: lctlg %c1,%c1,__LC_KERNEL_ASCE
417-
lg %r15,__LC_KERNEL_STACK
417+
1: lctlg %c1,%c1,__LC_KERNEL_ASCE(%r13)
418+
lg %r15,__LC_KERNEL_STACK(%r13)
418419
2: xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
419420
la %r11,STACK_FRAME_OVERHEAD(%r15)
420421
stmg %r0,%r7,__PT_R0(%r11)
@@ -428,18 +429,18 @@ SYM_CODE_START(\name)
428429
xgr %r7,%r7
429430
xgr %r10,%r10
430431
xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
431-
mvc __PT_R8(64,%r11),__LC_SAVE_AREA_ASYNC
432-
MBEAR %r11,%r0
432+
mvc __PT_R8(64,%r11),__LC_SAVE_AREA_ASYNC(%r13)
433+
MBEAR %r11,%r13
433434
stmg %r8,%r9,__PT_PSW(%r11)
434435
lgr %r2,%r11 # pass pointer to pt_regs
435436
brasl %r14,\handler
436-
mvc __LC_RETURN_PSW(16),__PT_PSW(%r11)
437+
mvc __LC_RETURN_PSW(16,%r13),__PT_PSW(%r11)
437438
tmhh %r8,0x0001 # returning to user ?
438439
jno 2f
439440
STACKLEAK_ERASE
440-
lctlg %c1,%c1,__LC_USER_ASCE
441+
lctlg %c1,%c1,__LC_USER_ASCE(%r13)
441442
BPON
442-
stpt __LC_EXIT_TIMER
443+
stpt __LC_EXIT_TIMER(%r13)
443444
2: LBEAR __PT_LAST_BREAK(%r11)
444445
lmg %r0,%r15,__PT_R0(%r11)
445446
LPSWEY __LC_RETURN_PSW,__LC_RETURN_LPSWE

0 commit comments

Comments
 (0)