aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/flush.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2006-03-10 17:26:47 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-10 17:26:47 -0500
commit141fa40cff90881ac4d81f6afa27bc283fe7acca (patch)
tree7991b0f3910dafb58e1ef92044153e5383b01850 /arch/arm/mm/flush.c
parente7fcdb79ecaa01e2eba06e3fb64e10455bdb5aa7 (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/flush.c')
-rw-r--r--arch/arm/mm/flush.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 330695b6b19d..b103e56806bd 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -24,14 +24,16 @@
24static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) 24static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
25{ 25{
26 unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); 26 unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT);
27 const int zero = 0;
27 28
28 set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL)); 29 set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL));
29 flush_tlb_kernel_page(to); 30 flush_tlb_kernel_page(to);
30 31
31 asm( "mcrr p15, 0, %1, %0, c14\n" 32 asm( "mcrr p15, 0, %1, %0, c14\n"
32 " mcrr p15, 0, %1, %0, c5\n" 33 " mcr p15, 0, %2, c7, c10, 4\n"
34 " mcr p15, 0, %2, c7, c5, 0\n"
33 : 35 :
34 : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES) 36 : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES), "r" (zero)
35 : "cc"); 37 : "cc");
36} 38}
37 39