aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm/cache.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/mm/cache.S')
-rw-r--r--arch/arm64/mm/cache.S24
1 files changed, 20 insertions, 4 deletions
diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S
index c46f48b33c14..fda756875fa6 100644
--- a/arch/arm64/mm/cache.S
+++ b/arch/arm64/mm/cache.S
@@ -168,6 +168,14 @@ ENTRY(__flush_dcache_area)
168ENDPROC(__flush_dcache_area) 168ENDPROC(__flush_dcache_area)
169 169
170/* 170/*
171 * __inval_cache_range(start, end)
172 * - start - start address of region
173 * - end - end address of region
174 */
175ENTRY(__inval_cache_range)
176 /* FALLTHROUGH */
177
178/*
171 * __dma_inv_range(start, end) 179 * __dma_inv_range(start, end)
172 * - start - virtual start address of region 180 * - start - virtual start address of region
173 * - end - virtual end address of region 181 * - end - virtual end address of region
@@ -175,14 +183,22 @@ ENDPROC(__flush_dcache_area)
175__dma_inv_range: 183__dma_inv_range:
176 dcache_line_size x2, x3 184 dcache_line_size x2, x3
177 sub x3, x2, #1 185 sub x3, x2, #1
178 bic x0, x0, x3 186 tst x1, x3 // end cache line aligned?
179 bic x1, x1, x3 187 bic x1, x1, x3
1801: dc ivac, x0 // invalidate D / U line 188 b.eq 1f
181 add x0, x0, x2 189 dc civac, x1 // clean & invalidate D / U line
1901: tst x0, x3 // start cache line aligned?
191 bic x0, x0, x3
192 b.eq 2f
193 dc civac, x0 // clean & invalidate D / U line
194 b 3f
1952: dc ivac, x0 // invalidate D / U line
1963: add x0, x0, x2
182 cmp x0, x1 197 cmp x0, x1
183 b.lo 1b 198 b.lo 2b
184 dsb sy 199 dsb sy
185 ret 200 ret
201ENDPROC(__inval_cache_range)
186ENDPROC(__dma_inv_range) 202ENDPROC(__dma_inv_range)
187 203
188/* 204/*