Skip to content

[ATfE] Fix way_offset in A-profile cache invalidation#774

Open
voltur01 wants to merge 1 commit intoarm:arm-softwarefrom
voltur01:fix_a_profile_cache_invalidation
Open

[ATfE] Fix way_offset in A-profile cache invalidation#774
voltur01 wants to merge 1 commit intoarm:arm-softwarefrom
voltur01:fix_a_profile_cache_invalidation

Conversation

@voltur01
Copy link
Contributor

@voltur01 voltur01 commented Mar 5, 2026

In the code the ways variable is set to actual number of ways, e.g. 8.

way_offset is calculated as the number of leading 0s, however 8 requires 4 bits to be encoded while the ways in the loop as encoded into 3 bits as values from 0 to 7.

Thus way_offset should be the number of leading 0s for (ways - 1).

Same logic was just implemented in M-profile version.

In the code the ways variable is set to actual number of ways, e.g. 8.

way_offset is calculated as the number of leading 0s, however 8 requires 4 bits to be encoded while the ways in the loop as encoded into 3 bits as values from 0 to 7.

Thus way_offset should be the number of leading 0s for (ways - 1).

Same logic was just implemented in M-profile version.
@voltur01 voltur01 requested a review from a team as a code owner March 5, 2026 14:51
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