Lines Matching refs:next
527 static void tls_thread_switch(struct task_struct *next) in tls_thread_switch() argument
531 if (is_compat_thread(task_thread_info(next))) in tls_thread_switch()
532 write_sysreg(next->thread.uw.tp_value, tpidrro_el0); in tls_thread_switch()
536 write_sysreg(*task_user_tls(next), tpidr_el0); in tls_thread_switch()
538 write_sysreg_s(next->thread.tpidr2_el0, SYS_TPIDR2_EL0); in tls_thread_switch()
545 static void ssbs_thread_switch(struct task_struct *next) in ssbs_thread_switch() argument
551 if (unlikely(next->flags & PF_KTHREAD)) in ssbs_thread_switch()
561 spectre_v4_enable_task_mitigation(next); in ssbs_thread_switch()
573 static void entry_task_switch(struct task_struct *next) in entry_task_switch() argument
575 __this_cpu_write(__entry_task, next); in entry_task_switch()
585 static void gcs_thread_switch(struct task_struct *next) in gcs_thread_switch() argument
592 write_sysreg_s(next->thread.gcspr_el0, SYS_GCSPR_EL0); in gcs_thread_switch()
594 if (current->thread.gcs_el0_mode != next->thread.gcs_el0_mode) in gcs_thread_switch()
595 gcs_set_el0_mode(next); in gcs_thread_switch()
606 if (task_gcs_el0_enabled(current) || task_gcs_el0_enabled(next)) in gcs_thread_switch()
612 static void gcs_thread_switch(struct task_struct *next) in gcs_thread_switch() argument
624 static void update_cntkctl_el1(struct task_struct *next) in update_cntkctl_el1() argument
626 struct thread_info *ti = task_thread_info(next); in update_cntkctl_el1()
639 struct task_struct *next) in cntkctl_thread_switch() argument
643 (read_ti_thread_flags(task_thread_info(next)) & in cntkctl_thread_switch()
645 update_cntkctl_el1(next); in cntkctl_thread_switch()
667 static void permission_overlay_switch(struct task_struct *next) in permission_overlay_switch() argument
673 if (current->thread.por_el0 != next->thread.por_el0) { in permission_overlay_switch()
674 write_sysreg_s(next->thread.por_el0, SYS_POR_EL0); in permission_overlay_switch()
706 struct task_struct *next) in __switch_to() argument
710 fpsimd_thread_switch(next); in __switch_to()
711 tls_thread_switch(next); in __switch_to()
712 hw_breakpoint_thread_switch(next); in __switch_to()
713 contextidr_thread_switch(next); in __switch_to()
714 entry_task_switch(next); in __switch_to()
715 ssbs_thread_switch(next); in __switch_to()
716 cntkctl_thread_switch(prev, next); in __switch_to()
717 ptrauth_thread_switch_user(next); in __switch_to()
718 permission_overlay_switch(next); in __switch_to()
719 gcs_thread_switch(next); in __switch_to()
735 mte_thread_switch(next); in __switch_to()
737 if (prev->thread.sctlr_user != next->thread.sctlr_user) in __switch_to()
738 update_sctlr_el1(next->thread.sctlr_user); in __switch_to()
741 last = cpu_switch_to(prev, next); in __switch_to()