mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
arch/riscv: Rename riscv_syscall_dispatch to riscv_dispatch_syscall
follow other function naming(e.g. riscv_dispatch_irq) Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
7a209e6ee8
commit
629d9969dd
@@ -128,7 +128,7 @@
|
|||||||
# define ASM_SYS_CALL \
|
# define ASM_SYS_CALL \
|
||||||
" addi sp, sp, -16\n" /* Make room */ \
|
" addi sp, sp, -16\n" /* Make room */ \
|
||||||
REGSTORE " ra, 0(sp)\n" /* Save ra */ \
|
REGSTORE " ra, 0(sp)\n" /* Save ra */ \
|
||||||
" jal ra, riscv_syscall_dispatch\n" /* Dispatch (modifies ra) */ \
|
" jal ra, riscv_dispatch_syscall\n" /* Dispatch (modifies ra) */ \
|
||||||
REGLOAD " ra, 0(sp)\n" /* Restore ra */ \
|
REGLOAD " ra, 0(sp)\n" /* Restore ra */ \
|
||||||
" addi sp, sp, 16\n" /* Restore sp */
|
" addi sp, sp, 16\n" /* Restore sp */
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ uintptr_t riscv_mhartid(void);
|
|||||||
/* If kernel runs in Supervisor mode, a system call trampoline is needed */
|
/* If kernel runs in Supervisor mode, a system call trampoline is needed */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_USE_S_MODE
|
#ifdef CONFIG_ARCH_USE_S_MODE
|
||||||
void riscv_syscall_dispatch(void) noreturn_function;
|
void riscv_dispatch_syscall(void) noreturn_function;
|
||||||
void *riscv_perform_syscall(uintptr_t *regs);
|
void *riscv_perform_syscall(uintptr_t *regs);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ static void dispatch_syscall(void)
|
|||||||
"mv a2, a0\n" /* a2=Save return value in a0 */
|
"mv a2, a0\n" /* a2=Save return value in a0 */
|
||||||
"li a0, 3\n" /* a0=SYS_syscall_return (3) */
|
"li a0, 3\n" /* a0=SYS_syscall_return (3) */
|
||||||
#ifdef CONFIG_ARCH_USE_S_MODE
|
#ifdef CONFIG_ARCH_USE_S_MODE
|
||||||
" j riscv_syscall_dispatch" /* Return from the syscall */
|
"j riscv_dispatch_syscall" /* Return from the syscall */
|
||||||
#else
|
#else
|
||||||
" ecall" /* Return from the syscall */
|
" ecall" /* Return from the syscall */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
# If the NuttX kernel runs in S-mode
|
# If the NuttX kernel runs in S-mode
|
||||||
|
|
||||||
CMN_ASRCS += riscv_syscall_dispatch.S
|
CMN_ASRCS += riscv_dispatch_syscall.S
|
||||||
CMN_CSRCS += riscv_sbi.c riscv_perform_syscall.c
|
CMN_CSRCS += riscv_sbi.c riscv_perform_syscall.c
|
||||||
CMN_CSRCS += riscv_percpu.c
|
CMN_CSRCS += riscv_percpu.c
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/risc-v/src/common/supervisor/riscv_syscall_dispatch.S
|
* arch/risc-v/src/common/supervisor/riscv_dispatch_syscall.S
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
.file "riscv_syscall_dispatch.S"
|
.file "riscv_dispatch_syscall.S"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -37,16 +37,16 @@
|
|||||||
* Public Symbols
|
* Public Symbols
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
.globl riscv_syscall_dispatch
|
.globl riscv_dispatch_syscall
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: riscv_syscall_dispatch
|
* Name: riscv_dispatch_syscall
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Dispatch syscall from kernel
|
* Dispatch syscall from kernel
|
||||||
*
|
*
|
||||||
* C Function Prototype:
|
* C Function Prototype:
|
||||||
* void riscv_syscall_dispatch(void);
|
* void riscv_dispatch_syscall(void);
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* Assumes the context to return is already set up
|
* Assumes the context to return is already set up
|
||||||
@@ -59,9 +59,9 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
.type riscv_syscall_dispatch, function
|
.type riscv_dispatch_syscall, function
|
||||||
|
|
||||||
riscv_syscall_dispatch:
|
riscv_dispatch_syscall:
|
||||||
|
|
||||||
addi sp, sp, -XCPTCONTEXT_SIZE /* make room */
|
addi sp, sp, -XCPTCONTEXT_SIZE /* make room */
|
||||||
save_ctx sp /* save current context */
|
save_ctx sp /* save current context */
|
||||||
|
|||||||
Reference in New Issue
Block a user