nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

qemu: fix smp boot not enter idle

Open hujun260 opened this issue 1 year ago • 3 comments

Summary

fix smp boot not enter idle

Configuring NuttX and compile: $ ./tools/configure.sh -l qemu-armv8a:nsh_smp $ make Running with qemu $ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic
-machine virt,virtualization=on,gic-version=3
-net none -chardev stdio,id=con,mux=on -serial chardev:con
-mon chardev=con,mode=readline -kernel ./nuttx

Impact

none

Testing

ostest

hujun260 avatar Sep 16 '24 08:09 hujun260

@hujun260 please update your patch to fix temp ci error

xiaoxiang781216 avatar Sep 16 '24 18:09 xiaoxiang781216

@hujun260

fix smp boot not enter idle

As long as I tested with the ** latest ** upstream (qemu-armv8a:nsh_smp), up_idle() is called on both CPU0 and CPU1.

(gdb) info threads                                                                                                                          
  Id   Target Id                    Frame                                                                                                   
  1    Thread 1.1 (CPU#0 [halted ]) 0x0000000040293ba4 in up_idle () at common/arm64_idle.c:63                                              
  2    Thread 1.2 (CPU#1 [halted ]) 0x0000000040293ba4 in up_idle () at common/arm64_idle.c:63      

Please tell us how you found the issue.

masayuki2009 avatar Sep 16 '24 23:09 masayuki2009

@hujun260

fix smp boot not enter idle

As long as I tested with the ** latest ** upstream (qemu-armv8a:nsh_smp), up_idle() is called on both CPU0 and CPU1.

(gdb) info threads                                                                                                                          
  Id   Target Id                    Frame                                                                                                   
  1    Thread 1.1 (CPU#0 [halted ]) 0x0000000040293ba4 in up_idle () at common/arm64_idle.c:63                                              
  2    Thread 1.2 (CPU#1 [halted ]) 0x0000000040293ba4 in up_idle () at common/arm64_idle.c:63      

Please tell us how you found the issue.

@hujun260

fix smp boot not enter idle

As long as I tested with the ** latest ** upstream (qemu-armv8a:nsh_smp), up_idle() is called on both CPU0 and CPU1.

(gdb) info threads                                                                                                                          
  Id   Target Id                    Frame                                                                                                   
  1    Thread 1.1 (CPU#0 [halted ]) 0x0000000040293ba4 in up_idle () at common/arm64_idle.c:63                                              
  2    Thread 1.2 (CPU#1 [halted ]) 0x0000000040293ba4 in up_idle () at common/arm64_idle.c:63      

Please tell us how you found the issue.

you are right. Our local code repository has such an issue. Let's keep this fix pending for now.

hujun260 avatar Sep 19 '24 07:09 hujun260

close already merged

xiaoxiang781216 avatar Oct 07 '24 09:10 xiaoxiang781216