Lines Matching refs:mm
12 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) in enter_lazy_tlb() argument
20 void get_new_mmu_context(struct mm_struct *mm);
27 int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
28 void destroy_context(struct mm_struct *mm);
35 static inline void tsb_context_switch(struct mm_struct *mm) in tsb_context_switch() argument
37 __tsb_context_switch(__pa(mm->pgd), in tsb_context_switch()
38 &mm->context.tsb_block[0], in tsb_context_switch()
40 (mm->context.tsb_block[1].tsb ? in tsb_context_switch()
41 &mm->context.tsb_block[1] : in tsb_context_switch()
46 , __pa(&mm->context.tsb_descr[0])); in tsb_context_switch()
49 void tsb_grow(struct mm_struct *mm,
53 void smp_tsb_sync(struct mm_struct *mm);
74 static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *ts… in switch_mm() argument
79 if (unlikely(mm == &init_mm)) in switch_mm()
82 spin_lock_irqsave(&mm->context.lock, flags); in switch_mm()
83 ctx_valid = CTX_VALID(mm->context); in switch_mm()
85 get_new_mmu_context(mm); in switch_mm()
117 load_secondary_context(mm); in switch_mm()
118 tsb_context_switch(mm); in switch_mm()
125 if (!ctx_valid || !cpumask_test_cpu(cpu, mm_cpumask(mm))) { in switch_mm()
126 cpumask_set_cpu(cpu, mm_cpumask(mm)); in switch_mm()
127 __flush_tlb_mm(CTX_HWBITS(mm->context), in switch_mm()
130 spin_unlock_irqrestore(&mm->context.lock, flags); in switch_mm()
133 #define deactivate_mm(tsk,mm) do { } while (0) argument
136 static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm) in activate_mm() argument
141 spin_lock_irqsave(&mm->context.lock, flags); in activate_mm()
142 if (!CTX_VALID(mm->context)) in activate_mm()
143 get_new_mmu_context(mm); in activate_mm()
145 if (!cpumask_test_cpu(cpu, mm_cpumask(mm))) in activate_mm()
146 cpumask_set_cpu(cpu, mm_cpumask(mm)); in activate_mm()
148 load_secondary_context(mm); in activate_mm()
149 __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT); in activate_mm()
150 tsb_context_switch(mm); in activate_mm()
151 spin_unlock_irqrestore(&mm->context.lock, flags); in activate_mm()