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

Clarify interaction of CBOs and PBMTs #1570

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Timmmm
Copy link
Contributor

@Timmmm Timmmm commented Jul 26, 2024

This is the suggestion from riscv/riscv-CMOs#57 (comment) which was never applied.

The behaviour can be technically inferred from this paragraph - as noted in one of the comments on that issue:

Accessing the same location using different cacheability attributes may cause loss of coherence. Executing the following sequence between such accesses prevents both loss of coherence and loss of memory ordering: fence iorw, iorw, followed by cbo.flush to an address of that location, followed by a fence iorw, iorw.

However this is subtle, which means implementation bugs are likely. Making it explicit removes the risk of confusion and the resulting bugs.

This is the suggestion from riscv/riscv-CMOs#57 (comment) which was never applied.

The behaviour can be technically inferred from this paragraph - as noted in one of the comments on that issue:

> Accessing the same location using different cacheability attributes may cause loss of coherence. Executing the following sequence between such accesses prevents both loss of coherence and loss of memory ordering: `fence iorw, iorw`, followed by `cbo.flush` to an address of that location, followed by a `fence iorw, iorw`.

However this is subtle, which means implementation bugs are likely. Making it explicit removes the risk of confusion and the resulting bugs.
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.

1 participant