Skip to content

Commit 6b289a3

Browse files
covanampalmer-dabbelt
authored andcommitted
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 <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 7aa7d50 commit 6b289a3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

arch/riscv/kernel/head.S

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,6 @@ clear_bss:
289289
blt a3, a4, clear_bss
290290
clear_bss_done:
291291
#endif
292-
/* Save hart ID and DTB physical address */
293-
mv s0, a0
294-
mv s1, a1
295-
296292
la a2, boot_cpu_hartid
297293
XIP_FIXUP_OFFSET a2
298294
REG_S a0, (a2)
@@ -306,7 +302,7 @@ clear_bss_done:
306302
la a0, __dtb_start
307303
XIP_FIXUP_OFFSET a0
308304
#else
309-
mv a0, s1
305+
mv a0, a1
310306
#endif /* CONFIG_BUILTIN_DTB */
311307
call setup_vm
312308
#ifdef CONFIG_MMU

0 commit comments

Comments
 (0)