aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-05-23 13:29:18 -0400
committerWill Deacon <will.deacon@arm.com>2013-08-12 07:25:44 -0400
commit587b9b6487acddf777301c867c24f31fdf4ada4a (patch)
tree2679cd18aab608967178492a3958f9eddcbc2750
parentf0915781bd5edf78b1154e61efe962dc15872d09 (diff)
ARM: tlb: don't bother with barriers for branch predictor maintenance
Branch predictor maintenance is only required when we are either changing the kernel's view of memory (switching tables completely) or dealing with ASID rollover. Both of these use-cases require subsequent TLB invalidation, which has the relevant barrier instructions to ensure completion and visibility of the maintenance, so this patch removes the instruction barrier from [local_]flush_bp_all. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm/include/asm/tlbflush.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
index 3316264916e9..9b725d2bcb6b 100644
--- a/arch/arm/include/asm/tlbflush.h
+++ b/arch/arm/include/asm/tlbflush.h
@@ -527,6 +527,10 @@ static inline void __flush_tlb_kernel_page(unsigned long kaddr)
527 } 527 }
528} 528}
529 529
530/*
531 * Branch predictor maintenance is paired with full TLB invalidation, so
532 * there is no need for any barriers here.
533 */
530static inline void local_flush_bp_all(void) 534static inline void local_flush_bp_all(void)
531{ 535{
532 const int zero = 0; 536 const int zero = 0;
@@ -536,9 +540,6 @@ static inline void local_flush_bp_all(void)
536 asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero)); 540 asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero));
537 else if (tlb_flag(TLB_V6_BP)) 541 else if (tlb_flag(TLB_V6_BP))
538 asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero)); 542 asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero));
539
540 if (tlb_flag(TLB_BARRIER))
541 isb();
542} 543}
543 544
544#include <asm/cputype.h> 545#include <asm/cputype.h>