Lines Matching refs:thread

251 	return task->thread.vl[type];  in task_get_vl()
257 task->thread.vl[type] = vl; in task_set_vl()
263 return task->thread.vl_onexec[type]; in task_get_vl_onexec()
269 task->thread.vl_onexec[type] = vl; in task_set_vl_onexec()
363 switch (current->thread.fp_type) { in task_fpsimd_load()
369 if (!thread_sm_enabled(&current->thread)) in task_fpsimd_load()
401 write_sysreg_s(current->thread.svcr, SYS_SVCR); in task_fpsimd_load()
403 if (thread_za_enabled(&current->thread)) in task_fpsimd_load()
404 sme_load_state(current->thread.sme_state, in task_fpsimd_load()
407 if (thread_sm_enabled(&current->thread)) in task_fpsimd_load()
412 write_sysreg_s(current->thread.uw.fpmr, SYS_FPMR); in task_fpsimd_load()
415 WARN_ON_ONCE(current->thread.fp_type != FP_STATE_SVE); in task_fpsimd_load()
416 sve_load_state(sve_pffr(&current->thread), in task_fpsimd_load()
417 &current->thread.uw.fpsimd_state.fpsr, in task_fpsimd_load()
420 WARN_ON_ONCE(current->thread.fp_type != FP_STATE_FPSIMD); in task_fpsimd_load()
421 fpsimd_load_state(&current->thread.uw.fpsimd_state); in task_fpsimd_load()
658 void *sst = task->thread.sve_state; in fpsimd_to_sve()
659 struct user_fpsimd_state const *fst = &task->thread.uw.fpsimd_state; in fpsimd_to_sve()
664 vq = sve_vq_from_vl(thread_get_cur_vl(&task->thread)); in fpsimd_to_sve()
682 void const *sst = task->thread.sve_state; in sve_to_fpsimd()
683 struct user_fpsimd_state *fst = &task->thread.uw.fpsimd_state; in sve_to_fpsimd()
690 vl = thread_get_cur_vl(&task->thread); in sve_to_fpsimd()
708 if (!thread_sm_enabled(&task->thread)) in task_smstop_sm()
711 __fpsimd_zero_vregs(&task->thread.uw.fpsimd_state); in task_smstop_sm()
712 task->thread.uw.fpsimd_state.fpsr = 0x0800009f; in task_smstop_sm()
714 task->thread.uw.fpmr = 0; in task_smstop_sm()
716 task->thread.svcr &= ~SVCR_SM_MASK; in task_smstop_sm()
717 task->thread.fp_type = FP_STATE_FPSIMD; in task_smstop_sm()
729 kfree(task->thread.sve_state); in sve_free()
730 task->thread.sve_state = NULL; in sve_free()
745 if (task->thread.sve_state) { in sve_alloc()
747 memset(task->thread.sve_state, 0, in sve_alloc()
753 task->thread.sve_state = in sve_alloc()
766 if (task->thread.fp_type == FP_STATE_SVE) in fpsimd_sync_from_effective_state()
781 void *sst = task->thread.sve_state; in fpsimd_sync_to_effective_state_zeropad()
782 struct user_fpsimd_state const *fst = &task->thread.uw.fpsimd_state; in fpsimd_sync_to_effective_state_zeropad()
784 if (task->thread.fp_type != FP_STATE_SVE) in fpsimd_sync_to_effective_state_zeropad()
787 vq = sve_vq_from_vl(thread_get_cur_vl(&task->thread)); in fpsimd_sync_to_effective_state_zeropad()
837 kfree(task->thread.sve_state); in change_live_vector_length()
838 task->thread.sve_state = sve_state; in change_live_vector_length()
842 task->thread.svcr &= ~SVCR_ZA_MASK; in change_live_vector_length()
843 kfree(task->thread.sme_state); in change_live_vector_length()
844 task->thread.sme_state = sme_state; in change_live_vector_length()
1204 if (task->thread.sme_state) { in sme_alloc()
1206 memset(task->thread.sme_state, 0, in sme_alloc()
1212 task->thread.sme_state = in sme_alloc()
1218 kfree(task->thread.sme_state); in sme_free()
1219 task->thread.sme_state = NULL; in sme_free()
1339 current->thread.fp_type = FP_STATE_SVE; in sve_init_regs()
1364 if (!current->thread.sve_state) { in do_sve_acc()
1416 if (!current->thread.sve_state || !current->thread.sme_state) { in do_sme_acc()
1491 if (last->st == &task->thread.kernel_fpsimd_state && in fpsimd_load_kernel_state()
1492 task->thread.kernel_fpsimd_cpu == smp_processor_id()) in fpsimd_load_kernel_state()
1495 fpsimd_load_state(&task->thread.kernel_fpsimd_state); in fpsimd_load_kernel_state()
1501 .st = &task->thread.kernel_fpsimd_state, in fpsimd_save_kernel_state()
1505 fpsimd_save_state(&task->thread.kernel_fpsimd_state); in fpsimd_save_kernel_state()
1508 task->thread.kernel_fpsimd_cpu = smp_processor_id(); in fpsimd_save_kernel_state()
1558 &next->thread.uw.fpsimd_state; in fpsimd_thread_switch()
1559 wrong_cpu = next->thread.fpsimd_cpu != smp_processor_id(); in fpsimd_thread_switch()
1612 memset(&current->thread.uw.fpsimd_state, 0, in fpsimd_flush_thread()
1613 sizeof(current->thread.uw.fpsimd_state)); in fpsimd_flush_thread()
1619 sve_state = current->thread.sve_state; in fpsimd_flush_thread()
1620 current->thread.sve_state = NULL; in fpsimd_flush_thread()
1629 sme_state = current->thread.sme_state; in fpsimd_flush_thread()
1630 current->thread.sme_state = NULL; in fpsimd_flush_thread()
1633 current->thread.svcr = 0; in fpsimd_flush_thread()
1637 current->thread.uw.fpmr = 0; in fpsimd_flush_thread()
1639 current->thread.fp_type = FP_STATE_FPSIMD; in fpsimd_flush_thread()
1670 last->st = &current->thread.uw.fpsimd_state; in fpsimd_bind_task_to_cpu()
1671 last->sve_state = current->thread.sve_state; in fpsimd_bind_task_to_cpu()
1672 last->sme_state = current->thread.sme_state; in fpsimd_bind_task_to_cpu()
1675 last->svcr = &current->thread.svcr; in fpsimd_bind_task_to_cpu()
1676 last->fpmr = &current->thread.uw.fpmr; in fpsimd_bind_task_to_cpu()
1677 last->fp_type = &current->thread.fp_type; in fpsimd_bind_task_to_cpu()
1679 current->thread.fpsimd_cpu = smp_processor_id(); in fpsimd_bind_task_to_cpu()
1757 current->thread.uw.fpsimd_state = *state; in fpsimd_update_current_state()
1758 if (current->thread.fp_type == FP_STATE_SVE) in fpsimd_update_current_state()
1775 t->thread.fpsimd_cpu = NR_CPUS; in fpsimd_flush_task_state()