Skip to content

Commit 12184a4

Browse files
svens-s390Vasily Gorbik
authored andcommitted
s390/entry: Make __sie64a() ready for lowcore relocation
In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in __sie64a(). 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 39e8c5d commit 12184a4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

arch/s390/kernel/entry.S

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <asm/setup.h>
2929
#include <asm/nmi.h>
3030
#include <asm/nospec-insn.h>
31+
#include <asm/lowcore.h>
3132

3233
_LPP_OFFSET = __LC_LPP
3334

@@ -184,7 +185,8 @@ SYM_FUNC_END(__switch_to_asm)
184185
*/
185186
SYM_FUNC_START(__sie64a)
186187
stmg %r6,%r14,__SF_GPRS(%r15) # save kernel registers
187-
lg %r14,__LC_CURRENT
188+
GET_LC %r13
189+
lg %r14,__LC_CURRENT(%r13)
188190
stg %r2,__SF_SIE_CONTROL_PHYS(%r15) # save sie block physical..
189191
stg %r3,__SF_SIE_CONTROL(%r15) # ...and virtual addresses
190192
stg %r4,__SF_SIE_SAVEAREA(%r15) # save guest register save area
@@ -211,8 +213,9 @@ SYM_FUNC_START(__sie64a)
211213
.Lsie_skip:
212214
lg %r14,__SF_SIE_CONTROL(%r15) # get control block pointer
213215
ni __SIE_PROG0C+3(%r14),0xfe # no longer in SIE
214-
lctlg %c1,%c1,__LC_KERNEL_ASCE # load primary asce
215-
lg %r14,__LC_CURRENT
216+
GET_LC %r14
217+
lctlg %c1,%c1,__LC_KERNEL_ASCE(%r14) # load primary asce
218+
lg %r14,__LC_CURRENT(%r14)
216219
mvi __TI_sie(%r14),0
217220
# some program checks are suppressing. C code (e.g. do_protection_exception)
218221
# will rewind the PSW by the ILC, which is often 4 bytes in case of SIE. There

0 commit comments

Comments
 (0)