Lines Matching refs:mm
86 * assigned to a struct mm, and we'll never target it with a ginvt instruction.
106 static inline u64 cpu_context(unsigned int cpu, const struct mm_struct *mm)
109 return atomic64_read(&mm->context.mmid);
111 return mm->context.asid[cpu];
115 struct mm_struct *mm, u64 ctx)
118 atomic64_set(&mm->context.mmid, ctx);
120 mm->context.asid[cpu] = ctx;
124 #define cpu_asid(cpu, mm) \
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)
142 set_cpu_context(0, mm, 0);
145 set_cpu_context(i, mm, 0);
148 mm->context.bd_emupage_allocmap = NULL;
149 spin_lock_init(&mm->context.bd_emupage_lock);
150 init_waitqueue_head(&mm->context.bd_emupage_queue);
181 static inline void destroy_context(struct mm_struct *mm)
183 dsemul_mm_cleanup(mm);
187 drop_mmu_context(struct mm_struct *mm)
197 ctx = cpu_context(cpu, mm);
218 } else if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
220 * mm is currently active, so we can't really drop it.
224 get_new_mmu_context(mm);
225 write_c0_entryhi(cpu_asid(cpu, mm));
229 set_cpu_context(cpu, mm, 0);