diff options
Diffstat (limited to 'arch/arm/mm/cache-v7.S')
| -rw-r--r-- | arch/arm/mm/cache-v7.S | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index bda0ec31a4e2..e1bd9759617f 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <asm/assembler.h> | 15 | #include <asm/assembler.h> |
| 16 | #include <asm/unwind.h> | ||
| 16 | 17 | ||
| 17 | #include "proc-macros.S" | 18 | #include "proc-macros.S" |
| 18 | 19 | ||
| @@ -153,13 +154,16 @@ ENTRY(v7_coherent_kern_range) | |||
| 153 | * - the Icache does not read data from the write buffer | 154 | * - the Icache does not read data from the write buffer |
| 154 | */ | 155 | */ |
| 155 | ENTRY(v7_coherent_user_range) | 156 | ENTRY(v7_coherent_user_range) |
| 157 | UNWIND(.fnstart ) | ||
| 156 | dcache_line_size r2, r3 | 158 | dcache_line_size r2, r3 |
| 157 | sub r3, r2, #1 | 159 | sub r3, r2, #1 |
| 158 | bic r0, r0, r3 | 160 | bic r0, r0, r3 |
| 159 | 1: mcr p15, 0, r0, c7, c11, 1 @ clean D line to the point of unification | 161 | 1: |
| 162 | USER( mcr p15, 0, r0, c7, c11, 1 ) @ clean D line to the point of unification | ||
| 160 | dsb | 163 | dsb |
| 161 | mcr p15, 0, r0, c7, c5, 1 @ invalidate I line | 164 | USER( mcr p15, 0, r0, c7, c5, 1 ) @ invalidate I line |
| 162 | add r0, r0, r2 | 165 | add r0, r0, r2 |
| 166 | 2: | ||
| 163 | cmp r0, r1 | 167 | cmp r0, r1 |
| 164 | blo 1b | 168 | blo 1b |
| 165 | mov r0, #0 | 169 | mov r0, #0 |
| @@ -167,6 +171,17 @@ ENTRY(v7_coherent_user_range) | |||
| 167 | dsb | 171 | dsb |
| 168 | isb | 172 | isb |
| 169 | mov pc, lr | 173 | mov pc, lr |
| 174 | |||
| 175 | /* | ||
| 176 | * Fault handling for the cache operation above. If the virtual address in r0 | ||
| 177 | * isn't mapped, just try the next page. | ||
| 178 | */ | ||
| 179 | 9001: | ||
| 180 | mov r0, r0, lsr #12 | ||
| 181 | mov r0, r0, lsl #12 | ||
| 182 | add r0, r0, #4096 | ||
| 183 | b 2b | ||
| 184 | UNWIND(.fnend ) | ||
| 170 | ENDPROC(v7_coherent_kern_range) | 185 | ENDPROC(v7_coherent_kern_range) |
| 171 | ENDPROC(v7_coherent_user_range) | 186 | ENDPROC(v7_coherent_user_range) |
| 172 | 187 | ||
