Lines Matching refs:current

363 		write_sysreg_s(current->thread.uw.fpmr, SYS_FPMR);  in task_fpsimd_load()
366 switch (current->thread.fp_type) { in task_fpsimd_load()
373 if (!thread_sm_enabled(&current->thread) && in task_fpsimd_load()
378 sve_set_vq(sve_vq_from_vl(task_get_sve_vl(current)) - 1); in task_fpsimd_load()
400 unsigned long sme_vl = task_get_sme_vl(current); in task_fpsimd_load()
406 write_sysreg_s(current->thread.svcr, SYS_SVCR); in task_fpsimd_load()
408 if (thread_za_enabled(&current->thread)) in task_fpsimd_load()
409 sme_load_state(current->thread.sme_state, in task_fpsimd_load()
412 if (thread_sm_enabled(&current->thread)) in task_fpsimd_load()
417 WARN_ON_ONCE(current->thread.fp_type != FP_STATE_SVE); in task_fpsimd_load()
418 sve_load_state(sve_pffr(&current->thread), in task_fpsimd_load()
419 &current->thread.uw.fpsimd_state.fpsr, in task_fpsimd_load()
422 WARN_ON_ONCE(current->thread.fp_type != FP_STATE_FPSIMD); in task_fpsimd_load()
423 fpsimd_load_state(&current->thread.uw.fpsimd_state); in task_fpsimd_load()
874 if (task == current) { in vec_set_vector_length()
902 if (task == current) in vec_set_vector_length()
938 ret = task_get_vl_onexec(current, type); in vec_prctl_status()
940 ret = task_get_vl(current, type); in vec_prctl_status()
960 ret = vec_set_vector_length(current, ARM64_VEC_SVE, vl, flags); in sve_set_current_vl()
989 ret = vec_set_vector_length(current, ARM64_VEC_SME, vl, flags); in sme_set_current_vl()
1363 sve_vq_from_vl(task_get_sve_vl(current)) - 1; in sve_init_regs()
1368 fpsimd_to_sve(current); in sve_init_regs()
1369 current->thread.fp_type = FP_STATE_SVE; in sve_init_regs()
1370 fpsimd_flush_task_state(current); in sve_init_regs()
1393 sve_alloc(current, true); in do_sve_acc()
1394 if (!current->thread.sve_state) { in do_sve_acc()
1444 sve_alloc(current, false); in do_sme_acc()
1445 sme_alloc(current, true); in do_sme_acc()
1446 if (!current->thread.sve_state || !current->thread.sme_state) { in do_sme_acc()
1459 sve_vq_from_vl(task_get_sme_vl(current)) - 1; in do_sme_acc()
1508 current); in do_fpsimd_exc()
1571 fpsimd_save_kernel_state(current); in fpsimd_thread_switch()
1608 vl = task_get_vl_onexec(current, type); in fpsimd_flush_thread_vl()
1619 task_set_vl(current, type, vl); in fpsimd_flush_thread_vl()
1626 task_set_vl_onexec(current, type, 0); in fpsimd_flush_thread_vl()
1639 fpsimd_flush_task_state(current); in fpsimd_flush_thread()
1640 memset(&current->thread.uw.fpsimd_state, 0, in fpsimd_flush_thread()
1641 sizeof(current->thread.uw.fpsimd_state)); in fpsimd_flush_thread()
1647 sve_state = current->thread.sve_state; in fpsimd_flush_thread()
1648 current->thread.sve_state = NULL; in fpsimd_flush_thread()
1657 sme_state = current->thread.sme_state; in fpsimd_flush_thread()
1658 current->thread.sme_state = NULL; in fpsimd_flush_thread()
1661 current->thread.svcr = 0; in fpsimd_flush_thread()
1664 current->thread.fp_type = FP_STATE_FPSIMD; in fpsimd_flush_thread()
1693 if (current->thread.fp_type == FP_STATE_SVE) in fpsimd_signal_preserve_current_state()
1694 sve_to_fpsimd(current); in fpsimd_signal_preserve_current_state()
1715 sve_to_fpsimd(current); in fpsimd_kvm_prepare()
1716 current->thread.fp_type = FP_STATE_FPSIMD; in fpsimd_kvm_prepare()
1732 last->st = &current->thread.uw.fpsimd_state; in fpsimd_bind_task_to_cpu()
1733 last->sve_state = current->thread.sve_state; in fpsimd_bind_task_to_cpu()
1734 last->sme_state = current->thread.sme_state; in fpsimd_bind_task_to_cpu()
1735 last->sve_vl = task_get_sve_vl(current); in fpsimd_bind_task_to_cpu()
1736 last->sme_vl = task_get_sme_vl(current); in fpsimd_bind_task_to_cpu()
1737 last->svcr = &current->thread.svcr; in fpsimd_bind_task_to_cpu()
1738 last->fpmr = &current->thread.uw.fpmr; in fpsimd_bind_task_to_cpu()
1739 last->fp_type = &current->thread.fp_type; in fpsimd_bind_task_to_cpu()
1741 current->thread.fpsimd_cpu = smp_processor_id(); in fpsimd_bind_task_to_cpu()
1828 current->thread.uw.fpsimd_state = *state; in fpsimd_update_current_state()
1830 fpsimd_to_sve(current); in fpsimd_update_current_state()
1915 fpsimd_save_kernel_state(current); in kernel_neon_begin()
1968 fpsimd_load_kernel_state(current); in kernel_neon_end()