diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-12-30 20:50:17 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-12-30 20:50:17 -0800 |
| commit | a0befb254ec4ec8ddca0d301cc2ee775d1925e43 (patch) | |
| tree | 2a7c54e33d4f92a011289a8ff5298fa8c416e8b1 | |
| parent | a4f5f7d5ee2c352486df5c01283de51837b074a0 (diff) | |
| parent | d1128b352411bc8dfc32dfc14b605aaca26ae959 (diff) | |
Merge "arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb"
| -rw-r--r-- | arch/arm64/include/asm/mmu_context.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index 7e00215aa9f5..ba8343303284 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -165,20 +165,6 @@ void check_and_switch_context(struct mm_struct *mm, unsigned int cpu); #define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; }) -/* - * This is called when "tsk" is about to enter lazy TLB mode. - * - * mm: describes the currently active mm context - * tsk: task which is entering lazy tlb - * cpu: cpu number which is entering lazy tlb - * - * tsk->mm will be NULL - */ -static inline void -enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - #ifdef CONFIG_ARM64_SW_TTBR0_PAN static inline void update_saved_ttbr0(struct task_struct *tsk, struct mm_struct *mm) @@ -202,6 +188,16 @@ static inline void update_saved_ttbr0(struct task_struct *tsk, } #endif +static inline void +enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) +{ + /* + * We don't actually care about the ttbr0 mapping, so point it at the + * zero page. + */ + update_saved_ttbr0(tsk, &init_mm); +} + static inline void __switch_mm(struct mm_struct *next) { unsigned int cpu = smp_processor_id(); |
