Message ID | 20230725053835.138910-1-namcaov@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 10f763532d585ca257eae113cf2c635c925419c6 |
Headers | show |
Series | riscv: remove redundant mv instructions | expand |
Context | Check | Description |
---|---|---|
conchuod/cover_letter | success | Single patches do not need cover letters |
conchuod/tree_selection | success | Guessed tree name to be for-next at HEAD 471aba2e4760 |
conchuod/fixes_present | success | Fixes tag not required for -next series |
conchuod/maintainers_pattern | success | MAINTAINERS pattern errors before the patch: 4 and now 4 |
conchuod/verify_signedoff | success | Signed-off-by tag matches author and committer |
conchuod/kdoc | success | Errors and warnings before: 0 this patch: 0 |
conchuod/build_rv64_clang_allmodconfig | success | Errors and warnings before: 9 this patch: 9 |
conchuod/module_param | success | Was 0 now: 0 |
conchuod/build_rv64_gcc_allmodconfig | success | Errors and warnings before: 9 this patch: 9 |
conchuod/build_rv32_defconfig | success | Build OK |
conchuod/dtb_warn_rv64 | success | Errors and warnings before: 3 this patch: 3 |
conchuod/header_inline | success | No static functions without inline keyword in header files |
conchuod/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 18 lines checked |
conchuod/build_rv64_nommu_k210_defconfig | success | Build OK |
conchuod/verify_fixes | success | No Fixes tag |
conchuod/build_rv64_nommu_virt_defconfig | success | Build OK |
Hi Nam, On 25/07/2023 07:38, Nam Cao wrote: > 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> > --- > arch/riscv/kernel/head.S | 6 +----- > 1 file changed, 1 insertion(+), 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 You can add: Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Thanks, Alex
Hello: This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <palmer@rivosinc.com>: On Tue, 25 Jul 2023 07:38:35 +0200 you wrote: > 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> > --- > arch/riscv/kernel/head.S | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) Here is the summary with links: - riscv: remove redundant mv instructions https://git.kernel.org/riscv/c/10f763532d58 You are awesome, thank you!
On Tue, 25 Jul 2023 07:38:35 +0200, Nam Cao wrote: > 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. > > Applied, thanks! [1/1] riscv: remove redundant mv instructions https://git.kernel.org/palmer/c/10f763532d58 Best regards,
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
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> --- arch/riscv/kernel/head.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)