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

riscv mtimer: don't directly modify interrupt enables #2134

Merged
merged 1 commit into from Oct 2, 2020

Conversation

hudson-ayers
Copy link
Contributor

Pull Request Overview

This pull request removes all direct manipulations of the risc-v mtimer interrupt enable that do not occur from within the top level interrupt handler or a board main file. This is to bring RISC-V chips in line with the current Tock interrupt architecture, so that any discussion of allowing peripherals to directly enable/disable interrupts can wait until after the 1.6 release.

Why I think these removals do not affect correctness of the code:

  • SchedulerTimer::arm() and SchedulerTimer::disarm() are optional optimizations

  • set_alarm() uses the approach recommended in the RISC-V ISA to avoid triggering alarms while setting them, so disabling interrupts while setting the alarm should no longer be required. Enabling interrupts at the end of set_alarm() is not required, because with this change timer interrupts should never be disabled.

With this change, #2116 can safely be merged as-is.

Testing Strategy

This pull request was tested by compiling.

TODO or Help Wanted

N/A

Documentation Updated

  • No updates are required.

Formatting

  • Ran make prepush.

@phil-levis
Copy link
Contributor

bors r+

@bors bors bot merged commit 7995e8b into tock:master Oct 2, 2020
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.

None yet

3 participants