summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2024-07-22 16:41:24 +0300
committerVasily Gorbik <gor@linux.ibm.com>2024-07-23 17:02:32 +0300
commit7cc86dee44a47d961fd6195fd91f75ce176b992d (patch)
tree85db9984bd22e1a0fe1bd769f5386c6c6f0913b5 /arch/s390
parent4064b711127e1eb5b5fd42d539fd45e3e33c9b6f (diff)
downloadlinux-7cc86dee44a47d961fd6195fd91f75ce176b992d.tar.xz
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 <hca@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/entry.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index ca58b3da3916..bbdbe3c3a770 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -169,13 +169,14 @@ SYM_FUNC_START(__switch_to_asm)
stg %r15,__THREAD_ksp(%r1,%r2) # store kernel stack of prev
lg %r15,0(%r4,%r3) # start of kernel stack of next
agr %r15,%r5 # end of kernel stack of next
- stg %r3,__LC_CURRENT # store task struct of next
- stg %r15,__LC_KERNEL_STACK # store end of kernel stack
+ GET_LC %r13
+ stg %r3,__LC_CURRENT(%r13) # store task struct of next
+ stg %r15,__LC_KERNEL_STACK(%r13) # store end of kernel stack
lg %r15,__THREAD_ksp(%r1,%r3) # load kernel stack of next
aghi %r3,__TASK_pid
- mvc __LC_CURRENT_PID(4,%r0),0(%r3) # store pid of next
+ mvc __LC_CURRENT_PID(4,%r13),0(%r3) # store pid of next
+ ALTERNATIVE "nop", "lpp _LPP_OFFSET(%r13)", ALT_FACILITY(40)
lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task
- ALTERNATIVE "nop", "lpp _LPP_OFFSET", ALT_FACILITY(40)
BR_EX %r14
SYM_FUNC_END(__switch_to_asm)