This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit eca40ff053200039ed528f9b1530d44d8c90232f Author: p-szafonimateusz <[email protected]> AuthorDate: Wed Nov 27 15:48:33 2024 +0100 arch/x86_64/intel64: re-enable interrupts before syscall handle arch/x86_64/intel64: re-enable interrupts before syscall handle --- arch/x86_64/src/common/x86_64_syscall.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86_64/src/common/x86_64_syscall.c b/arch/x86_64/src/common/x86_64_syscall.c index 216727a2ca..d00a1f324a 100644 --- a/arch/x86_64/src/common/x86_64_syscall.c +++ b/arch/x86_64/src/common/x86_64_syscall.c @@ -302,6 +302,15 @@ uint64_t *x86_64_syscall(uint64_t *regs) rtcb->xcp.saved_ursp = regs[REG_RSP]; #endif + /* Re-enable interrupts if enabled before. + * Current task RFLAGS are stored in R11. + */ + + if (regs[REG_R11] & X86_64_RFLAGS_IF) + { + up_irq_restore(X86_64_RFLAGS_IF); + } + /* Call syscall function */ ret = stub(nbr, arg1, arg2, arg3, arg4, arg5, arg6);
