Lines Matching refs:vl

278 	return task->thread.vl[type];  in task_get_vl()
282 unsigned long vl) in task_set_vl() argument
284 task->thread.vl[type] = vl; in task_set_vl()
294 unsigned long vl) in task_set_vl_onexec() argument
296 task->thread.vl_onexec[type] = vl; in task_set_vl_onexec()
467 unsigned int vl; in fpsimd_save() local
485 vl = last->sve_vl; in fpsimd_save()
501 vl = last->sme_vl; in fpsimd_save()
507 if (WARN_ON(sve_get_vl() != vl)) { in fpsimd_save()
518 sve_ffr_offset(vl), in fpsimd_save()
534 unsigned int vl) in find_supported_vector_length() argument
540 if (WARN_ON(!sve_vl_valid(vl))) in find_supported_vector_length()
541 vl = info->min_vl; in find_supported_vector_length()
546 if (vl > max_vl) in find_supported_vector_length()
547 vl = max_vl; in find_supported_vector_length()
548 if (vl < info->min_vl) in find_supported_vector_length()
549 vl = info->min_vl; in find_supported_vector_length()
552 __vq_to_bit(sve_vq_from_vl(vl))); in find_supported_vector_length()
564 int vl = get_default_vl(type); in vec_proc_do_default_vl() local
566 .data = &vl, in vec_proc_do_default_vl()
567 .maxlen = sizeof(vl), in vec_proc_do_default_vl()
575 if (vl == -1) in vec_proc_do_default_vl()
576 vl = info->max_vl; in vec_proc_do_default_vl()
578 if (!sve_vl_valid(vl)) in vec_proc_do_default_vl()
581 set_default_vl(type, find_supported_vector_length(type, vl)); in vec_proc_do_default_vl()
702 unsigned int vq, vl; in sve_to_fpsimd() local
711 vl = thread_get_cur_vl(&task->thread); in sve_to_fpsimd()
712 vq = sve_vq_from_vl(vl); in sve_to_fpsimd()
743 unsigned int vl = 0; in sve_state_size() local
746 vl = task_get_sve_vl(task); in sve_state_size()
748 vl = max(vl, task_get_sme_vl(task)); in sve_state_size()
750 return SVE_SIG_REGS_SIZE(sve_vq_from_vl(vl)); in sve_state_size()
849 unsigned long vl, unsigned long flags) in vec_set_vector_length() argument
857 if (!sve_vl_valid(vl)) in vec_set_vector_length()
866 if (vl > VL_ARCH_MAX) in vec_set_vector_length()
867 vl = VL_ARCH_MAX; in vec_set_vector_length()
869 vl = find_supported_vector_length(type, vl); in vec_set_vector_length()
873 task_set_vl_onexec(task, type, vl); in vec_set_vector_length()
882 if (vl == task_get_vl(task, type)) in vec_set_vector_length()
921 task_set_vl(task, type, vl); in vec_set_vector_length()
969 unsigned long vl, flags; in sve_set_current_vl() local
972 vl = arg & PR_SVE_VL_LEN_MASK; in sve_set_current_vl()
973 flags = arg & ~vl; in sve_set_current_vl()
978 ret = vec_set_vector_length(current, ARM64_VEC_SVE, vl, flags); in sve_set_current_vl()
998 unsigned long vl, flags; in sme_set_current_vl() local
1001 vl = arg & PR_SME_VL_LEN_MASK; in sme_set_current_vl()
1002 flags = arg & ~vl; in sme_set_current_vl()
1007 ret = vec_set_vector_length(current, ARM64_VEC_SME, vl, flags); in sme_set_current_vl()
1027 unsigned int vq, vl; in vec_probe_vqs() local
1036 vl = sve_get_vl(); in vec_probe_vqs()
1039 vl = sme_get_vl(); in vec_probe_vqs()
1042 vl = 0; in vec_probe_vqs()
1047 if (sve_vq_from_vl(vl) > vq) in vec_probe_vqs()
1050 vq = sve_vq_from_vl(vl); /* skip intervening lengths */ in vec_probe_vqs()
1590 int vl, supported_vl; in fpsimd_flush_thread_vl() local
1602 vl = task_get_vl_onexec(current, type); in fpsimd_flush_thread_vl()
1603 if (!vl) in fpsimd_flush_thread_vl()
1604 vl = get_default_vl(type); in fpsimd_flush_thread_vl()
1606 if (WARN_ON(!sve_vl_valid(vl))) in fpsimd_flush_thread_vl()
1607 vl = vl_info[type].min_vl; in fpsimd_flush_thread_vl()
1609 supported_vl = find_supported_vector_length(type, vl); in fpsimd_flush_thread_vl()
1610 if (WARN_ON(supported_vl != vl)) in fpsimd_flush_thread_vl()
1611 vl = supported_vl; in fpsimd_flush_thread_vl()
1613 task_set_vl(current, type, vl); in fpsimd_flush_thread_vl()