Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu: fix smp boot not enter idle #13487

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

hujun260
Copy link
Contributor

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

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

Signed-off-by: hujun5 <[email protected]>
@xiaoxiang781216
Copy link
Contributor

@hujun260 please update your patch to fix temp ci error

@masayuki2009
Copy link
Contributor

@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
Copy link
Contributor Author

@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 hujun260 marked this pull request as draft September 19, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants