Move to a pull approach for interrupt detection. - #1899
Open
Prashanth Mundkur (pmundkur) wants to merge 2 commits into
Open
Move to a pull approach for interrupt detection.#1899Prashanth Mundkur (pmundkur) wants to merge 2 commits into
Prashanth Mundkur (pmundkur) wants to merge 2 commits into
Conversation
Collaborator
Author
Prashanth Mundkur (pmundkur)
requested a review
from Nadime Barhoumi (nadime15)
August 24, 2026 21:17
| then deleg else p | ||
| } | ||
|
|
||
| private function update_mip() -> unit = { |
Collaborator
There was a problem hiding this comment.
I haven’t fully looked into the code yet, but why isn’t all of the code below part of read_mip()?
Collaborator
Author
There was a problem hiding this comment.
The {m,s,vs}timecmp CSRs are currently not visible to read_mip. They will eventually need to move out of interrupt_regs anyway and depending on how we refactor, update_mip could then be merged into read_mip.
Collaborator
Author
There was a problem hiding this comment.
Actually, only mtimecmp (and msip) will need to move out.
Collaborator
Author
|
It looks like this broke a couple of DAMO tests. I'll investigate ... |
Prashanth Mundkur (pmundkur)
force-pushed
the
interrupt_detect_on_read
branch
2 times, most recently
from
August 26, 2026 16:20
e2c2dd7 to
15716ba
Compare
Prashanth Mundkur (pmundkur)
force-pushed
the
interrupt_detect_on_read
branch
2 times, most recently
from
August 27, 2026 14:44
c66674b to
4176770
Compare
This removes `clint_dispatch()`, which pushed updates to `mip` when memory-mapped registers were updated. It is replaced by `update_mip()`, which updates `mip` to incorporate changes from these registers before pending interrupts are computed for dispatch.
This defines an interface for interrupt controllers in `core/interrupt_interface.sail`, and implements this interface for the CLINT in `sys/platform.sail`.
This required moving the `{s,vs}timecmp` CSRs to `interrupt_regs`, and explicitly introducing the CLINT's `msip`, which was previously implicit in the push-oriented approach. The `mtimecmp` and `mtime` registers are kept private to the CLINT, to make it easier to isolate later as a separate platform component.
This aligns the CLINT's interrupts with the pull-based handling of those from the `simple_interrupt_generator`.
The handling of external interrupts using the `simple_interrupt_generator` is unchanged.
Prashanth Mundkur (pmundkur)
force-pushed
the
interrupt_detect_on_read
branch
from
August 27, 2026 21:46
4176770 to
8fe96cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes
clint_dispatch(), which pushed (i.e. wrote) updates tomipwhen memory-mapped registers were updated. This is replaced byupdate_mip(), which updatesmipto incorporate changes from (i.e. reads) these registers before pending interrupts are computed for dispatch.This defines an interface for interrupt controllers in
core/interrupt_interface.sail, and implements this interface for the CLINT insys/platform.sail.This required moving the
{s,vs}timecmpCSRs tointerrupt_regs, and explicitly introducing the CLINT'smsip, which was previously implicit in the push-oriented approach. Themtimeandmtimecmpregisters are kept private to the CLINT, to make it easier to isolate later as a separate platform component.This aligns the handling of CLINT's interrupts with the handling of those from the
simple_interrupt_generator. The handling of external interrupts using thesimple_interrupt_generatoris unchanged.