Skip to content

Commit 21586cf

Browse files
Sukanto Ghoshkamalmostafa
authored andcommitted
arm64: mm: Fix operands of clz in __flush_dcache_all
commit b4fed07 upstream. The format of the lower 32-bits of the 64-bit operand to 'dc cisw' is unchanged from ARMv7 architecture and the upper bits are RES0. This implies that the 'way' field of the operand of 'dc cisw' occupies the bit-positions [31 .. (32-A)]. Due to the use of 64-bit extended operands to 'clz', the existing implementation of __flush_dcache_all is incorrectly placing the 'way' field in the bit-positions [63 .. (64-A)]. Signed-off-by: Sukanto Ghosh <sghosh@apm.com> Tested-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
1 parent e2834ca commit 21586cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/mm/cache.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ loop1:
5252
add x2, x2, #4 // add 4 (line length offset)
5353
mov x4, #0x3ff
5454
and x4, x4, x1, lsr #3 // find maximum number on the way size
55-
clz x5, x4 // find bit position of way size increment
55+
clz w5, w4 // find bit position of way size increment
5656
mov x7, #0x7fff
5757
and x7, x7, x1, lsr #13 // extract max number of the index size
5858
loop2:

0 commit comments

Comments
 (0)