summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNam Cao <namcaov@gmail.com>2023-07-25 07:38:35 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2023-08-31 00:18:25 -0700
commit6b289a3ffa562070556ca66b766a88b1563d7759 (patch)
treef86f556a558e1cf099324bc33e4fe1f6e63c2972 /arch
parent7aa7d502e4d5a42353325cb4bf2aa880b10168e9 (diff)
downloadlwn-6b289a3ffa562070556ca66b766a88b1563d7759.tar.gz
lwn-6b289a3ffa562070556ca66b766a88b1563d7759.zip
riscv: remove redundant mv instructions
Some mv instructions were useful when first introduced to preserve a0 and a1 before function calls. However the code has changed and they are now redundant. Remove them. Signed-off-by: Nam Cao <namcaov@gmail.com> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20230725053835.138910-1-namcaov@gmail.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/kernel/head.S6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index 11c3b94c4534..3710ea5d160f 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -289,10 +289,6 @@ clear_bss:
blt a3, a4, clear_bss
clear_bss_done:
#endif
- /* Save hart ID and DTB physical address */
- mv s0, a0
- mv s1, a1
-
la a2, boot_cpu_hartid
XIP_FIXUP_OFFSET a2
REG_S a0, (a2)
@@ -306,7 +302,7 @@ clear_bss_done:
la a0, __dtb_start
XIP_FIXUP_OFFSET a0
#else
- mv a0, s1
+ mv a0, a1
#endif /* CONFIG_BUILTIN_DTB */
call setup_vm
#ifdef CONFIG_MMU