-
- Downloads
riscv: entry: Convert to generic entry
This patch converts riscv to use the generic entry infrastructure from kernel/entry/*. The generic entry makes maintainers' work easier and codes more elegant. Here are the changes: - More clear entry.S with handle_exception and ret_from_exception - Get rid of complex custom signal implementation - Move syscall procedure from assembly to C, which is much more readable. - Connect ret_from_fork & ret_from_kernel_thread to generic entry. - Wrap with irqentry_enter/exit and syscall_enter/exit_from_user_mode - Use the standard preemption code instead of custom Suggested-by:Huacai Chen <chenhuacai@kernel.org> Reviewed-by:
Björn Töpel <bjorn@rivosinc.com> Tested-by:
Yipeng Zou <zouyipeng@huawei.com> Tested-by:
Jisheng Zhang <jszhang@kernel.org> Signed-off-by:
Guo Ren <guoren@linux.alibaba.com> Signed-off-by:
Guo Ren <guoren@kernel.org> Cc: Ben Hutchings <ben@decadent.org.uk> Link: https://lore.kernel.org/r/20230222033021.983168-5-guoren@kernel.org Signed-off-by:
Palmer Dabbelt <palmer@rivosinc.com>
Showing
- arch/riscv/Kconfig 1 addition, 0 deletionsarch/riscv/Kconfig
- arch/riscv/include/asm/asm-prototypes.h 2 additions, 0 deletionsarch/riscv/include/asm/asm-prototypes.h
- arch/riscv/include/asm/csr.h 0 additions, 1 deletionarch/riscv/include/asm/csr.h
- arch/riscv/include/asm/entry-common.h 11 additions, 0 deletionsarch/riscv/include/asm/entry-common.h
- arch/riscv/include/asm/ptrace.h 8 additions, 2 deletionsarch/riscv/include/asm/ptrace.h
- arch/riscv/include/asm/stacktrace.h 5 additions, 0 deletionsarch/riscv/include/asm/stacktrace.h
- arch/riscv/include/asm/syscall.h 21 additions, 0 deletionsarch/riscv/include/asm/syscall.h
- arch/riscv/include/asm/thread_info.h 1 addition, 12 deletionsarch/riscv/include/asm/thread_info.h
- arch/riscv/kernel/entry.S 34 additions, 208 deletionsarch/riscv/kernel/entry.S
- arch/riscv/kernel/head.h 0 additions, 1 deletionarch/riscv/kernel/head.h
- arch/riscv/kernel/ptrace.c 0 additions, 43 deletionsarch/riscv/kernel/ptrace.c
- arch/riscv/kernel/signal.c 2 additions, 27 deletionsarch/riscv/kernel/signal.c
- arch/riscv/kernel/traps.c 122 additions, 18 deletionsarch/riscv/kernel/traps.c
- arch/riscv/mm/fault.c 3 additions, 3 deletionsarch/riscv/mm/fault.c
Loading