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

rp235x: fix atomics, fix SIO spinlock stuck bug, fix missing core1 reset. #3851

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Feb 4, 2025

  • rp: Workaround "SIO spinlock stuck bug", reset PROC1 at boot.
  • rp: make atomics work properly between cores in rp235x.

closes #3839

Just like RP2040. The bug was "working as intended" on rp2040, so it is on rp235x.
@Dirbaio Dirbaio enabled auto-merge February 5, 2025 00:06
@Dirbaio Dirbaio added this pull request to the merge queue Feb 5, 2025
Merged via the queue into main with commit 556cc57 Feb 5, 2025
7 checks passed
@Dirbaio Dirbaio deleted the rp23-atomics-fix branch February 5, 2025 00:12
Comment on lines +654 to +658
pac::SIO.spinlock(31).write_value(1);

// We can still use PSM to reset PROC1 since it comes after PROC0 in the state machine.
pac::PSM.frce_off().write_and_wait(|w| w.set_proc1(true));
pac::PSM.frce_off().write_and_wait(|_| {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This contains a tiny race condition: Whatever still runs on core 1 may acquire the spinlock after we unlocked it, before core 1 gets reset. So maybe reset core 1 first?

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.

[RP235x] various hangs when using multicore
2 participants