aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/cache-v7.S
diff options
context:
space:
mode:
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2012-09-18 11:29:44 -0400
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2012-09-25 06:20:25 -0400
commit3287be8c4e2bd91211b3947ba726d95e8a1092b5 (patch)
tree0c58fb5c8897b4fd9118dfeda7247fbf3d2bfee0 /arch/arm/mm/cache-v7.S
parent031bd879f79d59d2f4fccd44377adf24fb977b5a (diff)
ARM: mm: rename jump labels in v7_flush_dcache_all function
This patch renames jump labels in v7_flush_dcache_all in order to define a specific flush cache levels entry point. Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Tested-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mm/cache-v7.S')
-rw-r--r--arch/arm/mm/cache-v7.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
index d1fa2f66d8c0..140b294bbd9b 100644
--- a/arch/arm/mm/cache-v7.S
+++ b/arch/arm/mm/cache-v7.S
@@ -48,7 +48,7 @@ ENTRY(v7_flush_dcache_louis)
48 mov r3, r3, lsr #20 @ r3 = LoUIS * 2 48 mov r3, r3, lsr #20 @ r3 = LoUIS * 2
49 moveq pc, lr @ return if level == 0 49 moveq pc, lr @ return if level == 0
50 mov r10, #0 @ r10 (starting level) = 0 50 mov r10, #0 @ r10 (starting level) = 0
51 b loop1 @ start flushing cache levels 51 b flush_levels @ start flushing cache levels
52ENDPROC(v7_flush_dcache_louis) 52ENDPROC(v7_flush_dcache_louis)
53 53
54/* 54/*
@@ -67,7 +67,7 @@ ENTRY(v7_flush_dcache_all)
67 mov r3, r3, lsr #23 @ left align loc bit field 67 mov r3, r3, lsr #23 @ left align loc bit field
68 beq finished @ if loc is 0, then no need to clean 68 beq finished @ if loc is 0, then no need to clean
69 mov r10, #0 @ start clean at cache level 0 69 mov r10, #0 @ start clean at cache level 0
70loop1: 70flush_levels:
71 add r2, r10, r10, lsr #1 @ work out 3x current cache level 71 add r2, r10, r10, lsr #1 @ work out 3x current cache level
72 mov r1, r0, lsr r2 @ extract cache type bits from clidr 72 mov r1, r0, lsr r2 @ extract cache type bits from clidr
73 and r1, r1, #7 @ mask of the bits for current cache only 73 and r1, r1, #7 @ mask of the bits for current cache only
@@ -89,9 +89,9 @@ loop1:
89 clz r5, r4 @ find bit position of way size increment 89 clz r5, r4 @ find bit position of way size increment
90 ldr r7, =0x7fff 90 ldr r7, =0x7fff
91 ands r7, r7, r1, lsr #13 @ extract max number of the index size 91 ands r7, r7, r1, lsr #13 @ extract max number of the index size
92loop2: 92loop1:
93 mov r9, r4 @ create working copy of max way size 93 mov r9, r4 @ create working copy of max way size
94loop3: 94loop2:
95 ARM( orr r11, r10, r9, lsl r5 ) @ factor way and cache number into r11 95 ARM( orr r11, r10, r9, lsl r5 ) @ factor way and cache number into r11
96 THUMB( lsl r6, r9, r5 ) 96 THUMB( lsl r6, r9, r5 )
97 THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11 97 THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11
@@ -100,13 +100,13 @@ loop3:
100 THUMB( orr r11, r11, r6 ) @ factor index number into r11 100 THUMB( orr r11, r11, r6 ) @ factor index number into r11
101 mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way 101 mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
102 subs r9, r9, #1 @ decrement the way 102 subs r9, r9, #1 @ decrement the way
103 bge loop3
104 subs r7, r7, #1 @ decrement the index
105 bge loop2 103 bge loop2
104 subs r7, r7, #1 @ decrement the index
105 bge loop1
106skip: 106skip:
107 add r10, r10, #2 @ increment cache number 107 add r10, r10, #2 @ increment cache number
108 cmp r3, r10 108 cmp r3, r10
109 bgt loop1 109 bgt flush_levels
110finished: 110finished:
111 mov r10, #0 @ swith back to cache level 0 111 mov r10, #0 @ swith back to cache level 0
112 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr 112 mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr