bigcat-2026 commented on code in PR #21986:
URL: https://github.com/apache/nuttx/pull/21986#discussion_r4702634959
##########
sched/init/nx_start.c:
##########
@@ -439,6 +439,18 @@ static void idle_group_initialize(void)
tls_init_info(tcb);
+#ifdef CONFIG_SMP
+ /* up_initial_state() builds the initial register frame at the top of
+ * the idle stack. tls_init_info() may reserve/adjust stack space, so
+ * secondary CPU idle contexts must be rebuilt after TLS setup.
+ */
+
+ if (i > 0)
+ {
+ up_initial_state(tcb);
Review Comment:
Done. Reverted the common SMP changes and kept the fix only in
arch/xtensa/src/common/xtensa_initialstate.c.
sched/init/nx_start.c and sched/init/nx_smpstart.c are no longer
modified, so other SMP targets are not affected.
Please re-run CI.
--
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]