Lines Matching refs:vl

251 	return task->thread.vl[type];  in task_get_vl()
255 unsigned long vl) in task_set_vl() argument
257 task->thread.vl[type] = vl; in task_set_vl()
267 unsigned long vl) in task_set_vl_onexec() argument
269 task->thread.vl_onexec[type] = vl; in task_set_vl_onexec()
444 unsigned int vl; in fpsimd_save_user_state() local
465 vl = last->sve_vl; in fpsimd_save_user_state()
481 vl = last->sme_vl; in fpsimd_save_user_state()
487 if (WARN_ON(sve_get_vl() != vl)) { in fpsimd_save_user_state()
498 sve_ffr_offset(vl), in fpsimd_save_user_state()
514 unsigned int vl) in find_supported_vector_length() argument
520 if (WARN_ON(!sve_vl_valid(vl))) in find_supported_vector_length()
521 vl = info->min_vl; in find_supported_vector_length()
526 if (vl > max_vl) in find_supported_vector_length()
527 vl = max_vl; in find_supported_vector_length()
528 if (vl < info->min_vl) in find_supported_vector_length()
529 vl = info->min_vl; in find_supported_vector_length()
532 __vq_to_bit(sve_vq_from_vl(vl))); in find_supported_vector_length()
544 int vl = get_default_vl(type); in vec_proc_do_default_vl() local
546 .data = &vl, in vec_proc_do_default_vl()
547 .maxlen = sizeof(vl), in vec_proc_do_default_vl()
555 if (vl == -1) in vec_proc_do_default_vl()
556 vl = info->max_vl; in vec_proc_do_default_vl()
558 if (!sve_vl_valid(vl)) in vec_proc_do_default_vl()
561 set_default_vl(type, find_supported_vector_length(type, vl)); in vec_proc_do_default_vl()
680 unsigned int vq, vl; in sve_to_fpsimd() local
689 vl = thread_get_cur_vl(&task->thread); in sve_to_fpsimd()
690 vq = sve_vq_from_vl(vl); in sve_to_fpsimd()
727 unsigned int vl = 0; in sve_state_size() local
730 vl = task_get_sve_vl(task); in sve_state_size()
732 vl = max(vl, task_get_sme_vl(task)); in sve_state_size()
734 return SVE_SIG_REGS_SIZE(sve_vq_from_vl(vl)); in sve_state_size()
833 unsigned long vl, unsigned long flags) in vec_set_vector_length() argument
841 if (!sve_vl_valid(vl)) in vec_set_vector_length()
850 if (vl > VL_ARCH_MAX) in vec_set_vector_length()
851 vl = VL_ARCH_MAX; in vec_set_vector_length()
853 vl = find_supported_vector_length(type, vl); in vec_set_vector_length()
857 task_set_vl_onexec(task, type, vl); in vec_set_vector_length()
866 if (vl == task_get_vl(task, type)) in vec_set_vector_length()
905 task_set_vl(task, type, vl); in vec_set_vector_length()
951 unsigned long vl, flags; in sve_set_current_vl() local
954 vl = arg & PR_SVE_VL_LEN_MASK; in sve_set_current_vl()
955 flags = arg & ~vl; in sve_set_current_vl()
960 ret = vec_set_vector_length(current, ARM64_VEC_SVE, vl, flags); in sve_set_current_vl()
980 unsigned long vl, flags; in sme_set_current_vl() local
983 vl = arg & PR_SME_VL_LEN_MASK; in sme_set_current_vl()
984 flags = arg & ~vl; in sme_set_current_vl()
989 ret = vec_set_vector_length(current, ARM64_VEC_SME, vl, flags); in sme_set_current_vl()
1009 unsigned int vq, vl; in vec_probe_vqs() local
1018 vl = sve_get_vl(); in vec_probe_vqs()
1021 vl = sme_get_vl(); in vec_probe_vqs()
1024 vl = 0; in vec_probe_vqs()
1029 if (sve_vq_from_vl(vl) > vq) in vec_probe_vqs()
1032 vq = sve_vq_from_vl(vl); /* skip intervening lengths */ in vec_probe_vqs()
1596 int vl, supported_vl; in fpsimd_flush_thread_vl() local
1608 vl = task_get_vl_onexec(current, type); in fpsimd_flush_thread_vl()
1609 if (!vl) in fpsimd_flush_thread_vl()
1610 vl = get_default_vl(type); in fpsimd_flush_thread_vl()
1612 if (WARN_ON(!sve_vl_valid(vl))) in fpsimd_flush_thread_vl()
1613 vl = vl_info[type].min_vl; in fpsimd_flush_thread_vl()
1615 supported_vl = find_supported_vector_length(type, vl); in fpsimd_flush_thread_vl()
1616 if (WARN_ON(supported_vl != vl)) in fpsimd_flush_thread_vl()
1617 vl = supported_vl; in fpsimd_flush_thread_vl()
1619 task_set_vl(current, type, vl); in fpsimd_flush_thread_vl()