Skip to content

Commit 7cc86de

Browse files
svens-s390Vasily Gorbik
authored andcommitted
s390/entry: Make __switch_to() ready for lowcore relocation
In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in __switch_to(). Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 4064b71 commit 7cc86de

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/s390/kernel/entry.S

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,14 @@ SYM_FUNC_START(__switch_to_asm)
169169
stg %r15,__THREAD_ksp(%r1,%r2) # store kernel stack of prev
170170
lg %r15,0(%r4,%r3) # start of kernel stack of next
171171
agr %r15,%r5 # end of kernel stack of next
172-
stg %r3,__LC_CURRENT # store task struct of next
173-
stg %r15,__LC_KERNEL_STACK # store end of kernel stack
172+
GET_LC %r13
173+
stg %r3,__LC_CURRENT(%r13) # store task struct of next
174+
stg %r15,__LC_KERNEL_STACK(%r13) # store end of kernel stack
174175
lg %r15,__THREAD_ksp(%r1,%r3) # load kernel stack of next
175176
aghi %r3,__TASK_pid
176-
mvc __LC_CURRENT_PID(4,%r0),0(%r3) # store pid of next
177+
mvc __LC_CURRENT_PID(4,%r13),0(%r3) # store pid of next
178+
ALTERNATIVE "nop", "lpp _LPP_OFFSET(%r13)", ALT_FACILITY(40)
177179
lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task
178-
ALTERNATIVE "nop", "lpp _LPP_OFFSET", ALT_FACILITY(40)
179180
BR_EX %r14
180181
SYM_FUNC_END(__switch_to_asm)
181182

0 commit comments

Comments
 (0)