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

Possible interrupt footgun on multicore systems #1525

Closed
MabezDev opened this issue Apr 30, 2024 · 2 comments · Fixed by #1568
Closed

Possible interrupt footgun on multicore systems #1525

MabezDev opened this issue Apr 30, 2024 · 2 comments · Fixed by #1568
Assignees
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@MabezDev
Copy link
Member

Now that the interrupt is handled internally by the peripheral driver, the interrupt is configured for the core the driver is created on, which means if core 0 creates a driver and moves it to core 1, its interrupt will still be handled by core 0. Maybe this isn't a big deal, but we should document or avoid it entirely if possible.

@MabezDev MabezDev added the help wanted Extra attention is needed label Apr 30, 2024
@bjoernQ
Copy link
Contributor

bjoernQ commented Apr 30, 2024

Maybe it would be good to have a way to specify which core the interrupt should be handled on.

IIRC we are considering removing the interrupt handler from the constructors and add set_interrupt_handler for all drivers instead. I guess having an additional parameter wouldn't be too bad, then. (Alternatively specify that on the #[handler] macro - don't know why but that doesn't sound good to me)

@MabezDev
Copy link
Member Author

Maybe it would be good to have a way to specify which core the interrupt should be handled on.

Unfortunately I don't think this is possible, at least on Xtensa. The mapping of interrupts can be done, but enable has be done each CPU respectively.

After thinking about this, I don't think this is a real issue. I will submit a docs PR to inform users about this, then we can close this.

@MabezDev MabezDev self-assigned this May 20, 2024
@MabezDev MabezDev added the documentation Improvements or additions to documentation label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants