diff options
-rw-r--r-- | arch/arm/mm/cache-v6.S | 7 | ||||
-rw-r--r-- | arch/arm/mm/flush.c | 6 |
2 files changed, 8 insertions, 5 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 | ||
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 @@ | |||
24 | static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) | 24 | static 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 | ||