pussuw commented on code in PR #13520: URL: https://github.com/apache/nuttx/pull/13520#discussion_r1771928920
########## arch/arm64/src/common/arm64_vectors.S: ########## @@ -196,179 +139,32 @@ SECTION_FUNC(text, arm64_jump_to_user) GTEXT(arm64_sync_exc) SECTION_FUNC(text, arm64_sync_exc) - /* checking the EC value to see which exception need to be handle */ - -#if CONFIG_ARCH_ARM64_EXCEPTION_LEVEL == 3 - mrs x9, esr_el3 + /* Switch to IRQ stack and save current sp on it. */ +#ifdef CONFIG_SMP + get_cpu_id x0 + ldr x1, =(g_cpu_int_stacktop) + lsl x0, x0, #3 + ldr x1, [x1, x0] #else - mrs x9, esr_el1 -#endif - lsr x10, x9, #26 - -#ifdef CONFIG_ARCH_FPU - /* fpu trap */ - - cmp x10, #0x07 /* Access to SIMD or floating-point */ - bne 1f - mov x0, sp /* x0 = context */ - bl arm64_fpu_trap - - /* when the fpu trap is handled */ - - b arm64_exit_exc_fpu_done -1: -#endif - /* 0x15 = SVC system call */ - - cmp x10, #0x15 - - /* if this is a svc call ?*/ - - bne exc_handle - -#ifdef CONFIG_LIB_SYSCALL Review Comment: Why exactly was this part changed??? Now you destroy the incoming system call parameter registers, and then re-read them from the context wasting massive amounts of CPU time?? WHY WAS THIS CHANGED? -- 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]
