riscv: entry: Consolidate general regs saving/restoring
authorJisheng Zhang <jszhang@kernel.org>
Wed, 22 Feb 2023 03:30:21 +0000 (22:30 -0500)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 23 Mar 2023 15:47:03 +0000 (08:47 -0700)
commit45b32b946a97bb4553bab30c2519bbaac55f39db
tree3454b93b6cb72fcb5b9b2b35c7e00d8f000070c0
parentab9164dae27334415537ccf1c3fbabf56b7793b2
riscv: entry: Consolidate general regs saving/restoring

Consolidate the saving/restoring GPs (except zero, ra, sp, gp,
tp and t0) into save_from_x6_to_x31/restore_from_x6_to_x31 macros.

No functional change intended.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Björn Töpel <bjorn@rivosinc.com>
Tested-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20230222033021.983168-8-guoren@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/asm.h
arch/riscv/kernel/entry.S
arch/riscv/kernel/mcount-dyn.S