Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223272
b: refs/heads/master
c: da30e0a
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas authored and Russell King committed Dec 12, 2010
1 parent 0f6e01b commit de45af8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f91e2c3bd427239c198351f44814dd39db91afe0
refs/heads/master: da30e0ac0f9a521f0cfec8145ddd1ad131f66d61
27 changes: 17 additions & 10 deletions trunk/arch/arm/mm/cache-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,22 @@ ENTRY(v7_coherent_user_range)
UNWIND(.fnstart )
dcache_line_size r2, r3
sub r3, r2, #1
bic r0, r0, r3
bic r12, r0, r3
1:
USER( mcr p15, 0, r0, c7, c11, 1 ) @ clean D line to the point of unification
USER( mcr p15, 0, r12, c7, c11, 1 ) @ clean D line to the point of unification
add r12, r12, r2
cmp r12, r1
blo 1b
dsb
USER( mcr p15, 0, r0, c7, c5, 1 ) @ invalidate I line
add r0, r0, r2
icache_line_size r2, r3
sub r3, r2, #1
bic r12, r0, r3
2:
cmp r0, r1
blo 1b
USER( mcr p15, 0, r12, c7, c5, 1 ) @ invalidate I line
add r12, r12, r2
cmp r12, r1
blo 2b
3:
mov r0, #0
ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable
ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB
Expand All @@ -194,10 +201,10 @@ ENTRY(v7_coherent_user_range)
* isn't mapped, just try the next page.
*/
9001:
mov r0, r0, lsr #12
mov r0, r0, lsl #12
add r0, r0, #4096
b 2b
mov r12, r12, lsr #12
mov r12, r12, lsl #12
add r12, r12, #4096
b 3b
UNWIND(.fnend )
ENDPROC(v7_coherent_kern_range)
ENDPROC(v7_coherent_user_range)
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/arm/mm/proc-macros.S
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@
mov \reg, \reg, lsl \tmp @ actual cache line size
.endm

/*
* icache_line_size - get the minimum I-cache line size from the CTR register
* on ARMv7.
*/
.macro icache_line_size, reg, tmp
mrc p15, 0, \tmp, c0, c0, 1 @ read ctr
and \tmp, \tmp, #0xf @ cache line size encoding
mov \reg, #4 @ bytes per word
mov \reg, \reg, lsl \tmp @ actual cache line size
.endm

/*
* Sanity check the PTE configuration for the code below - which makes
Expand Down

0 comments on commit de45af8

Please sign in to comment.