-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
arch: Remove the abuse of spinlock in smp boot #15728
base: master
Are you sure you want to change the base?
Conversation
[Experimental Bot, please feedback here] This PR description does not fully meet the NuttX requirements. While it provides a decent summary of the what and why, it lacks crucial details needed for proper review. Here's a breakdown: Missing/Insufficient Information:
How to Improve:
By providing this missing information, the PR will be much easier to review and more likely to be accepted. |
What's really need is a done signal sent from the secondary cpu to the boot cpu, so let's simplify the logic by: 1.Change the spinlock to a bool flag 2.Set the flag to true in the secondary cpu 3.Wait the flag set in the boot cpu before continue booting This also remove all bad usage of spinlock from the code base: 1.Lock spinlock in one thread, but unlock in a different thread 2.Lock spinlock twice in one thread, but unlock only once Signed-off-by: Xiang Xiao <[email protected]>
bbd6b4d
to
9c4b043
Compare
Summary
What's really need is a done signal sent from the secondary cpu to the boot cpu, so let's simplify the logic by:
This also remove all bad usage of spinlock from the code base:
Impact
Normalize the spinlock usage to avoid the future abuse by copy/paste
Testing
local