-
Notifications
You must be signed in to change notification settings - Fork 186
riscv: Use riscv_pac::CoreInterrupt in mie register
#330
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions for code re-use, otherwise LGTM.
|
Ooops! I pushed a few more changes. Can you please review the PR again? I will address your comments after your new review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change requests for code-reuse. Otherwise, LGTM.
Co-authored-by: rmsyn <[email protected]>
|
Before merging, I have some doubts about the naming: What do you think about having Additionally, should I include |
Either one is fine, I don't have strong opinions either way.
Whatever name you choose, I would personally prefer consistent naming. Up to you, though.
I think it would be good to include it. The same type of user that would want the other free functions would probably also prefer this one to be available. |
|
I changed it to Another philosophical question... Should We can either leave both In any case, if you prefer, we can discuss this in a future PR |
I think, for the same reasons enabling We have no way of knowing that all interrupt sources on all platforms are safe to enable. We also know that some interrupt sources are unsafe/unsound to enable in some contexts. In my opinion, the above means that we should mark it / leave it marked unsafe, and describe the invariants users need to consider / maintain. Another point is that we cannot, without a very convoluted setup, determine |
This PR adds new methods and functions for the
mieCSR. The idea is to use theriscv_pac::CoreInterruptNumbertrait to allow enabling and disabling target-specific interrupt sources (i.e., extending our API to non-standard interrupt sources).Closes #314