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

arch/*_cpupause:Allow a spin before taking the g_cpu_wait spinlock. #4677

Merged
merged 1 commit into from
Oct 17, 2021

Conversation

Ouss4
Copy link
Member

@Ouss4 Ouss4 commented Oct 17, 2021

Summary

If we repeatedly call up_cpu_pause and up_cpu_resume, there would be
cases where the next call to up_cpu_pause happens while the other CPU is
still responding to the previous resume request. In this case the
DEBUGASSERT will trigger. We should allow the first CPU to wait until the
other CPU has finished responding to the resume request.

Impact

Multi-core chips.

Testing

Tested with ESP32, see #4669

If we repeatedly call up_cpu_pause and up_cpu_resume, there would be
cases where the next call to up_cpu_pause happens while the other CPU is
still responding to the previous resume request. In this case the
DEBUGASSERT will trigger. We should allow the first CPU to wait until the
other CPU has finished responding to the resume request.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
@masayuki2009
Copy link
Contributor

LGTM.

@masayuki2009 masayuki2009 merged commit 7549de4 into apache:master Oct 17, 2021
@Ouss4 Ouss4 deleted the cpupause branch October 17, 2021 12:51
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.

2 participants