diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2006-03-10 17:26:47 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-10 17:26:47 -0500 |
commit | 141fa40cff90881ac4d81f6afa27bc283fe7acca (patch) | |
tree | 7991b0f3910dafb58e1ef92044153e5383b01850 /arch/arm/mm/cache-v6.S | |
parent | e7fcdb79ecaa01e2eba06e3fb64e10455bdb5aa7 (diff) |
[ARM] 3356/1: Workaround for the ARM1136 I-cache invalidation problem
Patch from Catalin Marinas
ARM1136 erratum 371025 (category 2) specifies that, under rare
conditions, an invalidate I-cache by MVA (line or range) operation can
fail to invalidate a cache line. The recommended workaround is to
either invalidate the entire I-cache or invalidate the range by
set/way rather than MVA.
Note that for a 16K cache size, invalidating a 4K page by set/way is
equivalent to invalidating the entire I-cache.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/cache-v6.S')
-rw-r--r-- | arch/arm/mm/cache-v6.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index d921c1024ae0..2c6c2a7c05a0 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -96,15 +96,16 @@ ENTRY(v6_coherent_user_range) | |||
96 | #ifdef HARVARD_CACHE | 96 | #ifdef HARVARD_CACHE |
97 | bic r0, r0, #CACHE_LINE_SIZE - 1 | 97 | bic r0, r0, #CACHE_LINE_SIZE - 1 |
98 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D line | 98 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D line |
99 | mcr p15, 0, r0, c7, c5, 1 @ invalidate I line | ||
100 | add r0, r0, #CACHE_LINE_SIZE | 99 | add r0, r0, #CACHE_LINE_SIZE |
101 | cmp r0, r1 | 100 | cmp r0, r1 |
102 | blo 1b | 101 | blo 1b |
103 | #endif | 102 | #endif |
104 | mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB | ||
105 | #ifdef HARVARD_CACHE | ||
106 | mov r0, #0 | 103 | mov r0, #0 |
104 | #ifdef HARVARD_CACHE | ||
107 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 105 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
106 | mcr p15, 0, r0, c7, c5, 0 @ I+BTB cache invalidate | ||
107 | #else | ||
108 | mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB | ||
108 | #endif | 109 | #endif |
109 | mov pc, lr | 110 | mov pc, lr |
110 | 111 | ||