qemu: fix smp boot not enter idle
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 please update your patch to fix temp ci error
@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:63Please 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:63Please 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.
close already merged