Commit 59478438 authored by Mark Rutland's avatar Mark Rutland
Browse files

cache.S: fix misleading comments



A couple of comments in cache.S are misleading. While they do not affect
the correctness of the code they do make it somewhat difficult to reason
about it:

CSSIDR_EL1[12:3] contains the associativity field, which is enconded as
one less than the total number of ways, (matching the maximum way index)
so the comment on line 40 is wrong.

Counting the leading zeros on a 32-bit register with the extracted
associativity field results in 32 - ceil(log2(max way index)), rather
than log2(ways) rounded down. Thus the comment on line 41 is also wrong.

This patch adjusts both comments to better reflect the code.

Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
parent ebc511d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment