diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2010-05-07 13:03:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-08 05:44:30 -0400 |
commit | b8349b569aae661dea9d59d7d2ee587ccea3336c (patch) | |
tree | 297ce3147521e0658321d61114a045bef4eca1d0 /arch/arm/include/asm/tlbflush.h | |
parent | f4d6477f7f073b99220386d62f5bf54bec3482cc (diff) |
ARM: 6112/1: Use the Inner Shareable I-cache and BTB ops on ARMv7 SMP
The standard I-cache Invalidate All (ICIALLU) and Branch Predication
Invalidate All (BPIALL) operations are not automatically broadcast to
the other CPUs in an ARMv7 MP system. The patch adds the Inner Shareable
variants, ICIALLUIS and BPIALLIS, if ARMv7 and SMP.
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/include/asm/tlbflush.h')
-rw-r--r-- | arch/arm/include/asm/tlbflush.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index e085e2c545eb..bd863d8608cd 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -46,6 +46,9 @@ | |||
46 | #define TLB_V7_UIS_FULL (1 << 20) | 46 | #define TLB_V7_UIS_FULL (1 << 20) |
47 | #define TLB_V7_UIS_ASID (1 << 21) | 47 | #define TLB_V7_UIS_ASID (1 << 21) |
48 | 48 | ||
49 | /* Inner Shareable BTB operation (ARMv7 MP extensions) */ | ||
50 | #define TLB_V7_IS_BTB (1 << 22) | ||
51 | |||
49 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ | 52 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ |
50 | #define TLB_DCLEAN (1 << 30) | 53 | #define TLB_DCLEAN (1 << 30) |
51 | #define TLB_WB (1 << 31) | 54 | #define TLB_WB (1 << 31) |
@@ -183,7 +186,7 @@ | |||
183 | #endif | 186 | #endif |
184 | 187 | ||
185 | #ifdef CONFIG_SMP | 188 | #ifdef CONFIG_SMP |
186 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ | 189 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_V7_IS_BTB | \ |
187 | TLB_V7_UIS_FULL | TLB_V7_UIS_PAGE | TLB_V7_UIS_ASID) | 190 | TLB_V7_UIS_FULL | TLB_V7_UIS_PAGE | TLB_V7_UIS_ASID) |
188 | #else | 191 | #else |
189 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ | 192 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ |
@@ -339,6 +342,12 @@ static inline void local_flush_tlb_all(void) | |||
339 | dsb(); | 342 | dsb(); |
340 | isb(); | 343 | isb(); |
341 | } | 344 | } |
345 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
346 | /* flush the branch target cache */ | ||
347 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
348 | dsb(); | ||
349 | isb(); | ||
350 | } | ||
342 | } | 351 | } |
343 | 352 | ||
344 | static inline void local_flush_tlb_mm(struct mm_struct *mm) | 353 | static inline void local_flush_tlb_mm(struct mm_struct *mm) |
@@ -376,6 +385,12 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) | |||
376 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 385 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
377 | dsb(); | 386 | dsb(); |
378 | } | 387 | } |
388 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
389 | /* flush the branch target cache */ | ||
390 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
391 | dsb(); | ||
392 | isb(); | ||
393 | } | ||
379 | } | 394 | } |
380 | 395 | ||
381 | static inline void | 396 | static inline void |
@@ -416,6 +431,12 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
416 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 431 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
417 | dsb(); | 432 | dsb(); |
418 | } | 433 | } |
434 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
435 | /* flush the branch target cache */ | ||
436 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
437 | dsb(); | ||
438 | isb(); | ||
439 | } | ||
419 | } | 440 | } |
420 | 441 | ||
421 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | 442 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) |
@@ -454,6 +475,12 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
454 | dsb(); | 475 | dsb(); |
455 | isb(); | 476 | isb(); |
456 | } | 477 | } |
478 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
479 | /* flush the branch target cache */ | ||
480 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
481 | dsb(); | ||
482 | isb(); | ||
483 | } | ||
457 | } | 484 | } |
458 | 485 | ||
459 | /* | 486 | /* |