Lines Matching refs:mm
106 static inline u64 cpu_context(unsigned int cpu, const struct mm_struct *mm) in cpu_context() argument
109 return atomic64_read(&mm->context.mmid); in cpu_context()
111 return mm->context.asid[cpu]; in cpu_context()
115 struct mm_struct *mm, u64 ctx) in set_cpu_context() argument
118 atomic64_set(&mm->context.mmid, ctx); in set_cpu_context()
120 mm->context.asid[cpu] = ctx; in set_cpu_context()
124 #define cpu_asid(cpu, mm) \ argument
125 (cpu_context((cpu), (mm)) & cpu_asid_mask(&cpu_data[cpu]))
127 extern void get_new_mmu_context(struct mm_struct *mm);
128 extern void check_mmu_context(struct mm_struct *mm);
129 extern void check_switch_mmu_context(struct mm_struct *mm);
137 init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument
142 set_cpu_context(0, mm, 0); in init_new_context()
145 set_cpu_context(i, mm, 0); in init_new_context()
148 mm->context.bd_emupage_allocmap = NULL; in init_new_context()
149 spin_lock_init(&mm->context.bd_emupage_lock); in init_new_context()
150 init_waitqueue_head(&mm->context.bd_emupage_queue); in init_new_context()
181 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument
183 dsemul_mm_cleanup(mm); in destroy_context()
187 drop_mmu_context(struct mm_struct *mm) in drop_mmu_context() argument
197 ctx = cpu_context(cpu, mm); in drop_mmu_context()
218 } else if (cpumask_test_cpu(cpu, mm_cpumask(mm))) { in drop_mmu_context()
224 get_new_mmu_context(mm); in drop_mmu_context()
225 write_c0_entryhi(cpu_asid(cpu, mm)); in drop_mmu_context()
229 set_cpu_context(cpu, mm, 0); in drop_mmu_context()