From 7f282f79289f87d7d9909ca1631bec84dddc2f44 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sat, 5 Jul 2025 22:22:38 -0400 Subject: [PATCH] xtensa: tracing: instrument thread switching Add missing call to thread_switched_in for the purpose of tracing. Fixes zephyrproject-rtos/zephyr#76057 Signed-off-by: Anas Nashif --- arch/xtensa/include/xtensa_asm2_s.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/xtensa/include/xtensa_asm2_s.h b/arch/xtensa/include/xtensa_asm2_s.h index d7799ac1125..a189d604fd8 100644 --- a/arch/xtensa/include/xtensa_asm2_s.h +++ b/arch/xtensa/include/xtensa_asm2_s.h @@ -606,6 +606,10 @@ _excint_noflush_\@: /* Restore A1 stack pointer from "next" handle. */ mov a1, a6 +#ifdef CONFIG_INSTRUMENT_THREAD_SWITCHING + call4 z_thread_mark_switched_in +#endif + _restore_\@: j _restore_context .endm