Skip to content
This repository has been archived by the owner on Feb 20, 2025. It is now read-only.

Fix unpacker race condition by putting stall after MMIO #45

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

amahmudTT
Copy link
Contributor

Fix the race condition by introducing a stall. Brought down the semaphore_post right before the stall as this is supposed to have no functional change. Since you cannot write to the address which is currently being used by the unpacker since there is a wait_for_next_context(2) right above it. Context can start from 0, then go to 1 and then come back to 0 and reach the MMIO writes when wait_for_next_context(2) passes, and that happens when the code that was previously working in context 0 has finished. Same argument for context 1.

Reverted the previous workaround change.

@amahmudTT
Copy link
Contributor Author

@amahmudTT amahmudTT merged commit dbfbf55 into main Nov 6, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants