pussuw commented on code in PR #6052: URL: https://github.com/apache/incubator-nuttx/pull/6052#discussion_r848375189
########## arch/risc-v/include/syscall.h: ########## @@ -124,16 +124,10 @@ #define SYS_signal_handler_return (7) #endif /* !CONFIG_BUILD_FLAT */ -#if defined (CONFIG_ARCH_USE_S_MODE) && defined (__KERNEL__) -# define ASM_SYS_CALL \ - " addi sp, sp, -16\n" /* Make room */ \ - REGSTORE " ra, 0(sp)\n" /* Save ra */ \ - " jal ra, riscv_dispatch_syscall\n" /* Dispatch (modifies ra) */ \ - REGLOAD " ra, 0(sp)\n" /* Restore ra */ \ - " addi sp, sp, 16\n" /* Restore sp */ +#if defined(CONFIG_ARCH_USE_S_MODE) && defined(__KERNEL__) +# define ASM_SYS_CALL "j riscv_dispatch_syscall\n" Review Comment: I don't think this will work, up_signal_dispatch actually returns here and now the software will simply get lost. ecall knows where to return since it sets EPC. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
