casaroli commented on code in PR #21986:
URL: https://github.com/apache/nuttx/pull/21986#discussion_r4696539843
##########
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:
This change and the `up_send_smp_sched()` loop at line 740 are in common
code: they change the boot of every SMP target (arm64, risc-v, x86_64, sim,
xtensa), not only esp32s3. The PR body is still the empty template, so there is
no reason given and no test of any SMP target.
Fix: keep the esp32s3 fix in esp32s3 code (for example rebuild the frame in
`xtensa_initialstate.c` only), or explain both changes in the PR body and add
ostest and `smp` logs of qemu-armv8a:nsh_smp and rv-virt:smp next to the
esp32s3 logs.
--
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]