Skip to content

config: Support coalesced explicit and SPM flushes#22

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

config: Support coalesced explicit and SPM flushes#22
thommythomaso merged 1 commit intomasterfrom
nw/fix-flush

Conversation

@niwis
Copy link
Copy Markdown
Contributor

@niwis niwis commented Apr 4, 2025

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
@thommythomaso thommythomaso merged commit 0c581ed into master Jul 9, 2025
9 checks passed
@thommythomaso thommythomaso deleted the nw/fix-flush branch July 9, 2025 17:08
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