Lines Matching refs:next
194 * Make sure the next time we go to switch to
205 static void choose_new_asid(struct mm_struct *next, u64 next_tlb_gen,
221 next->context.ctx_id)
244 * until the next time we switch to it.
309 void switch_mm(struct mm_struct *prev, struct mm_struct *next,
315 switch_mm_irqs_off(prev, next, tsk);
319 static inline unsigned long mm_mangle_tif_spec_ib(struct task_struct *next)
321 unsigned long next_tif = task_thread_info(next)->flags;
324 return (unsigned long)next->mm | ibpb;
327 static void cond_ibpb(struct task_struct *next)
329 if (!next || !next->mm)
375 next_mm = mm_mangle_tif_spec_ib(next);
395 if (this_cpu_read(cpu_tlbstate.last_user_mm) != next->mm) {
397 this_cpu_write(cpu_tlbstate.last_user_mm, next->mm);
422 void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
434 * NB: The scheduler will call us with prev == next when switching
437 * cpu_tlbstate.loaded_mm) matches next.
486 if (real_prev == next) {
488 next->context.ctx_id);
496 !cpumask_test_cpu(cpu, mm_cpumask(next))))
497 cpumask_set_cpu(cpu, mm_cpumask(next));
514 next_tlb_gen = atomic64_read(&next->context.tlb_gen);
547 if (next != &init_mm)
548 cpumask_set_cpu(cpu, mm_cpumask(next));
549 next_tlb_gen = atomic64_read(&next->context.tlb_gen);
551 choose_new_asid(next, next_tlb_gen, &new_asid, &need_flush);
559 this_cpu_write(cpu_tlbstate.ctxs[new_asid].ctx_id, next->context.ctx_id);
561 load_new_mm_cr3(next->pgd, new_asid, true);
566 load_new_mm_cr3(next->pgd, new_asid, false);
574 this_cpu_write(cpu_tlbstate.loaded_mm, next);
577 if (next != real_prev) {
578 cr4_update_pce_mm(next);
579 switch_ldt(real_prev, next);
811 * at the next context switch.