summaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorBo Yan <byan@nvidia.com>2013-04-22 16:02:07 -0700
committerMrutyunjay Sawant <msawant@nvidia.com>2013-04-30 01:49:22 -0700
commit70d75614b56e6d69f19b7da474aef9e8144024fe (patch)
treebeb91fd5185e4d0d977be30d581cdd903a04cb71 /arch/arm/include
parent9664fc586ba4f2a7486e3fe86634f9129eca3b9a (diff)
Revert "Revert "arm: errata: Workaround for Cortex-A15 erratum 798181 (TLBI/DSB operations)""
This reverts commit c7cc6aa56f184389203f380df1e39e94e2e2d6f5. Change-Id: Ia481c2f0d9f49e7f05eb2b3fe9a65d7cb4302326 Signed-off-by: Bo Yan <byan@nvidia.com> Reviewed-on: http://git-master/r/222643 GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/highmem.h7
-rw-r--r--arch/arm/include/asm/mmu_context.h7
-rw-r--r--arch/arm/include/asm/tlbflush.h15
3 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h
index 8c5e828f484d..91b99abe7a95 100644
--- a/arch/arm/include/asm/highmem.h
+++ b/arch/arm/include/asm/highmem.h
@@ -41,6 +41,13 @@ extern void kunmap_high(struct page *page);
#endif
#endif
+/*
+ * Needed to be able to broadcast the TLB invalidation for kmap.
+ */
+#ifdef CONFIG_ARM_ERRATA_798181
+#undef ARCH_NEEDS_KMAP_HIGH_GET
+#endif
+
#ifdef ARCH_NEEDS_KMAP_HIGH_GET
extern void *kmap_high_get(struct page *page);
#else
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h
index a0b3cac0547c..20d1dfeccfe3 100644
--- a/arch/arm/include/asm/mmu_context.h
+++ b/arch/arm/include/asm/mmu_context.h
@@ -125,6 +125,13 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
#endif
check_context(next);
cpu_switch_mm(next->pgd, next);
+#ifdef CONFIG_ARM_ERRATA_798181
+ /*
+ * DMB required since we only send IPI to the other CPUs if
+ * they run the same mm as the one being invalidated.
+ */
+ dmb();
+#endif
if (cache_is_vivt())
cpumask_clear_cpu(cpu, mm_cpumask(prev));
}
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
index 85fe61e73202..9b4541e784a2 100644
--- a/arch/arm/include/asm/tlbflush.h
+++ b/arch/arm/include/asm/tlbflush.h
@@ -447,6 +447,21 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
}
}
+#ifdef CONFIG_ARM_ERRATA_798181
+static inline void dummy_flush_tlb_a15_erratum(void)
+{
+ /*
+ * Dummy TLBIMVAIS. Using the unmapped address 0 and ASID 0.
+ */
+ asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (0));
+ dsb();
+}
+#else
+static inline void dummy_flush_tlb_a15_erratum(void)
+{
+}
+#endif
+
/*
* flush_pmd_entry
*