Skip to content

Commit 500d14a

Browse files
Ard Biesheuvelwilldeacon
authored andcommitted
arm64: kernel: avoid x18 in __cpu_soft_restart
The code in __cpu_soft_restart() uses x18 as an arbitrary temp register, which will shortly be disallowed. So use x8 instead. Link: https://patchwork.kernel.org/patch/9836877/ Signed-off-by: Ard Biesheuvel <[email protected]> [Sami: updated commit message] Signed-off-by: Sami Tolvanen <[email protected]> Reviewed-by: Mark Rutland <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent af12376 commit 500d14a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/cpu-reset.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ ENTRY(__cpu_soft_restart)
4242
mov x0, #HVC_SOFT_RESTART
4343
hvc #0 // no return
4444

45-
1: mov x18, x1 // entry
45+
1: mov x8, x1 // entry
4646
mov x0, x2 // arg0
4747
mov x1, x3 // arg1
4848
mov x2, x4 // arg2
49-
br x18
49+
br x8
5050
ENDPROC(__cpu_soft_restart)
5151

5252
.popsection

0 commit comments

Comments
 (0)