diff options
Diffstat (limited to 'include/asm-arm/tlbflush.h')
-rw-r--r-- | include/asm-arm/tlbflush.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index 8c6bc1bb9d1a..909656c747ef 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #define TLB_V6_D_ASID (1 << 17) | 39 | #define TLB_V6_D_ASID (1 << 17) |
40 | #define TLB_V6_I_ASID (1 << 18) | 40 | #define TLB_V6_I_ASID (1 << 18) |
41 | 41 | ||
42 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ | ||
42 | #define TLB_DCLEAN (1 << 30) | 43 | #define TLB_DCLEAN (1 << 30) |
43 | #define TLB_WB (1 << 31) | 44 | #define TLB_WB (1 << 31) |
44 | 45 | ||
@@ -51,6 +52,7 @@ | |||
51 | * v4 - ARMv4 without write buffer | 52 | * v4 - ARMv4 without write buffer |
52 | * v4wb - ARMv4 with write buffer without I TLB flush entry instruction | 53 | * v4wb - ARMv4 with write buffer without I TLB flush entry instruction |
53 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction | 54 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction |
55 | * fr - Feroceon (v4wbi with non-outer-cacheable page table walks) | ||
54 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction | 56 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction |
55 | */ | 57 | */ |
56 | #undef _TLB | 58 | #undef _TLB |
@@ -103,6 +105,23 @@ | |||
103 | # define v4wbi_always_flags (-1UL) | 105 | # define v4wbi_always_flags (-1UL) |
104 | #endif | 106 | #endif |
105 | 107 | ||
108 | #define fr_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_L2CLEAN_FR | \ | ||
109 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ | ||
110 | TLB_V4_I_PAGE | TLB_V4_D_PAGE) | ||
111 | |||
112 | #ifdef CONFIG_CPU_TLB_FEROCEON | ||
113 | # define fr_possible_flags fr_tlb_flags | ||
114 | # define fr_always_flags fr_tlb_flags | ||
115 | # ifdef _TLB | ||
116 | # define MULTI_TLB 1 | ||
117 | # else | ||
118 | # define _TLB v4wbi | ||
119 | # endif | ||
120 | #else | ||
121 | # define fr_possible_flags 0 | ||
122 | # define fr_always_flags (-1UL) | ||
123 | #endif | ||
124 | |||
106 | #define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \ | 125 | #define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \ |
107 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ | 126 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ |
108 | TLB_V4_D_PAGE) | 127 | TLB_V4_D_PAGE) |
@@ -245,12 +264,14 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
245 | #define possible_tlb_flags (v3_possible_flags | \ | 264 | #define possible_tlb_flags (v3_possible_flags | \ |
246 | v4_possible_flags | \ | 265 | v4_possible_flags | \ |
247 | v4wbi_possible_flags | \ | 266 | v4wbi_possible_flags | \ |
267 | fr_possible_flags | \ | ||
248 | v4wb_possible_flags | \ | 268 | v4wb_possible_flags | \ |
249 | v6wbi_possible_flags) | 269 | v6wbi_possible_flags) |
250 | 270 | ||
251 | #define always_tlb_flags (v3_always_flags & \ | 271 | #define always_tlb_flags (v3_always_flags & \ |
252 | v4_always_flags & \ | 272 | v4_always_flags & \ |
253 | v4wbi_always_flags & \ | 273 | v4wbi_always_flags & \ |
274 | fr_always_flags & \ | ||
254 | v4wb_always_flags & \ | 275 | v4wb_always_flags & \ |
255 | v6wbi_always_flags) | 276 | v6wbi_always_flags) |
256 | 277 | ||
@@ -417,6 +438,11 @@ static inline void flush_pmd_entry(pmd_t *pmd) | |||
417 | if (tlb_flag(TLB_DCLEAN)) | 438 | if (tlb_flag(TLB_DCLEAN)) |
418 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" | 439 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" |
419 | : : "r" (pmd) : "cc"); | 440 | : : "r" (pmd) : "cc"); |
441 | |||
442 | if (tlb_flag(TLB_L2CLEAN_FR)) | ||
443 | asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd" | ||
444 | : : "r" (pmd) : "cc"); | ||
445 | |||
420 | if (tlb_flag(TLB_WB)) | 446 | if (tlb_flag(TLB_WB)) |
421 | dsb(); | 447 | dsb(); |
422 | } | 448 | } |
@@ -428,6 +454,10 @@ static inline void clean_pmd_entry(pmd_t *pmd) | |||
428 | if (tlb_flag(TLB_DCLEAN)) | 454 | if (tlb_flag(TLB_DCLEAN)) |
429 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" | 455 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" |
430 | : : "r" (pmd) : "cc"); | 456 | : : "r" (pmd) : "cc"); |
457 | |||
458 | if (tlb_flag(TLB_L2CLEAN_FR)) | ||
459 | asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd" | ||
460 | : : "r" (pmd) : "cc"); | ||
431 | } | 461 | } |
432 | 462 | ||
433 | #undef tlb_flag | 463 | #undef tlb_flag |