aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2019-12-06 14:13:40 -0800
committerWill Deacon <[email protected]>2020-01-16 17:32:56 +0000
commit500d14affdf73677071c075bb9becc637b60fe39 (patch)
tree26b9d981037c97047fd993e13dd3e0b2f8567d66
parentaf12376814a5d8d2fa1c86eaa3adacf9dee2102e (diff)
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]>
-rw-r--r--arch/arm64/kernel/cpu-reset.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/cpu-reset.S b/arch/arm64/kernel/cpu-reset.S
index 6ea337d464c4..32c7bf858dd9 100644
--- a/arch/arm64/kernel/cpu-reset.S
+++ b/arch/arm64/kernel/cpu-reset.S
@@ -42,11 +42,11 @@ ENTRY(__cpu_soft_restart)
mov x0, #HVC_SOFT_RESTART
hvc #0 // no return
-1: mov x18, x1 // entry
+1: mov x8, x1 // entry
mov x0, x2 // arg0
mov x1, x3 // arg1
mov x2, x4 // arg2
- br x18
+ br x8
ENDPROC(__cpu_soft_restart)
.popsection