]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
cache.S: fix max cache level detection
authorMark Rutland <mark.rutland@arm.com>
Tue, 2 Jul 2013 14:44:06 +0000 (15:44 +0100)
committerMark Rutland <mark.rutland@arm.com>
Wed, 14 Aug 2013 13:14:50 +0000 (14:14 +0100)
Due to incorrect operands for an and, we treat the value of the Ctype1
field of clidr_el1 as if it were the LoC field.

Fix up the operands so we use LoC corretly.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
cache.S

diff --git a/cache.S b/cache.S
index ce928ebab970b96cf3de5d150fb093fe136bb84f..e8a73c8c9d014d945b626e11d3d317cfca59f7a1 100644 (file)
--- a/cache.S
+++ b/cache.S
@@ -15,7 +15,7 @@ flush_caches:
 
        /* find what out the max cache level to flush */
        lsr     x1, x0, #24
-       and     x1, x0, #(0x7)
+       and     x1, x1, #(0x7)
        cbz     x1, dcaches_done
 
        mov     x2, #0                  /* level 1 (represented 1-off) */