This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1bba3b81a22635c581d6670c54c20e74b639ef20 Author: hujun5 <[email protected]> AuthorDate: Mon Nov 23 11:03:39 2026 +0800 arm_a_r: Guard fork-specific syscall context The shared syscall implementation inherited the ARMv7-A fork context handling and accessed xcp.sregs on every A/R target. ARMv7-R and ARMv8-R do not provide this field because they do not advertise architecture fork support. Save the outermost syscall frame only when CONFIG_ARCH_HAVE_FORK is enabled, preserving ARMv7-A fork behavior without imposing the field on other A/R profiles. Signed-off-by: hujun5 <[email protected]> --- arch/arm/src/arm_a_r/arm_syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/src/arm_a_r/arm_syscall.c b/arch/arm/src/arm_a_r/arm_syscall.c index ed45a4ccfee..36d405d7ffe 100644 --- a/arch/arm/src/arm_a_r/arm_syscall.c +++ b/arch/arm/src/arm_a_r/arm_syscall.c @@ -482,10 +482,12 @@ uint32_t *arm_syscall(uint32_t *regs) * arm_fork(). */ +#ifdef CONFIG_ARCH_HAVE_FORK if (index == 0) { rtcb->xcp.sregs = regs; } +#endif regs[REG_PC] = (uint32_t)arm_dispatch_syscall; #ifndef CONFIG_BUILD_FLAT
