summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/mmu_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/include/asm/mmu_context.h')
-rw-r--r--arch/arm64/include/asm/mmu_context.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
index 04586a88487b..237635d8a46f 100644
--- a/arch/arm64/include/asm/mmu_context.h
+++ b/arch/arm64/include/asm/mmu_context.h
@@ -78,8 +78,11 @@ static inline void switch_new_context(struct mm_struct *mm)
static inline void check_and_switch_context(struct mm_struct *mm,
struct task_struct *tsk)
{
- /* unneeded switch to ASID0 */
- /* cpu_set_reserved_ttbr0(); */
+ /*
+ * Required during context switch to avoid speculative page table
+ * walking with the wrong TTBR.
+ */
+ cpu_set_reserved_ttbr0();
if (!((mm->context.id ^ cpu_last_asid) >> max_asid_bits))
/*