aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache.S b/cache.S
index 32e5652..081b8a7 100644
--- a/cache.S
+++ b/cache.S
@@ -37,8 +37,8 @@ flush_caches:
mrs x3, ccsidr_el1
and x4, x3, #0x7
add x4, x4, #4 /* log2 line size, corrected for offset */
- ubfx x6, x3, #3, #10 /* ways */
- clz w5, w6 /* log2 ways, rounded down */
+ ubfx x6, x3, #3, #10 /* max way index */
+ clz w5, w6 /* 32 - log2 ways */
ubfx x7, x3, #13, #15 /* sets */
/* loop over ways */