Skip to content

config: Support coalesced explicit and SPM flushes - #22

Merged
thommythomaso merged 1 commit into
masterfrom
nw/fix-flush
Jul 9, 2025
Merged

thommythomaso merged 1 commit into
masterfrom
nw/fix-flush

Conversation

@niwis

@niwis niwis commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

The current implementation assumes that a flush is triggered either by a write to cfg_flush or to cfg_spm, but never to both at the same time. In particular, when reconfiguring a way from SPM to LLC while any bit of cfg_flush is set, this can cause this way to remain marked as flushed and function neither as SPM nor LLC. In our scenario, the LLC was still in bypass mode even though some ways had been configured as LLC.

Fix this by reducing the if/else block to an invariant.

The current implementation assumes that a flush is triggered either by
a write to `cfg_flush` *or* to `cfg_spm`, but never to both at the same
time. In particular, when reconfiguring a way from SPM to LLC while any
bit of `cfg_flush` is set, this can cause this way to remain marked as
`flushed` and functioning neither as SPM nor LLC. In our scenario, the
LLC was still in bypass mode even though some ways have been configured
as LLC.

Fix this by reducing the if/else block to an invariant.

Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
@niwis
niwis requested a review from thommythomaso as a code owner April 4, 2025 11:15
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.

2 participants