Lines Matching refs:vl
286 return task->thread.vl[type]; in task_get_vl()
290 unsigned long vl) in task_set_vl() argument
292 task->thread.vl[type] = vl; in task_set_vl()
302 unsigned long vl) in task_set_vl_onexec() argument
304 task->thread.vl_onexec[type] = vl; in task_set_vl_onexec()
432 unsigned int vl; in fpsimd_save() local
443 vl = last->sve_vl; in fpsimd_save()
458 vl = last->sme_vl; in fpsimd_save()
464 if (WARN_ON(sve_get_vl() != vl)) { in fpsimd_save()
475 sve_ffr_offset(vl), in fpsimd_save()
489 unsigned int vl) in find_supported_vector_length() argument
495 if (WARN_ON(!sve_vl_valid(vl))) in find_supported_vector_length()
496 vl = info->min_vl; in find_supported_vector_length()
501 if (vl > max_vl) in find_supported_vector_length()
502 vl = max_vl; in find_supported_vector_length()
503 if (vl < info->min_vl) in find_supported_vector_length()
504 vl = info->min_vl; in find_supported_vector_length()
507 __vq_to_bit(sve_vq_from_vl(vl))); in find_supported_vector_length()
519 int vl = get_default_vl(type); in vec_proc_do_default_vl() local
521 .data = &vl, in vec_proc_do_default_vl()
522 .maxlen = sizeof(vl), in vec_proc_do_default_vl()
530 if (vl == -1) in vec_proc_do_default_vl()
531 vl = info->max_vl; in vec_proc_do_default_vl()
533 if (!sve_vl_valid(vl)) in vec_proc_do_default_vl()
536 set_default_vl(type, find_supported_vector_length(type, vl)); in vec_proc_do_default_vl()
657 unsigned int vq, vl; in sve_to_fpsimd() local
666 vl = thread_get_cur_vl(&task->thread); in sve_to_fpsimd()
667 vq = sve_vq_from_vl(vl); in sve_to_fpsimd()
698 unsigned int vl = 0; in sve_state_size() local
701 vl = task_get_sve_vl(task); in sve_state_size()
703 vl = max(vl, task_get_sme_vl(task)); in sve_state_size()
705 return SVE_SIG_REGS_SIZE(sve_vq_from_vl(vl)); in sve_state_size()
804 unsigned long vl, unsigned long flags) in vec_set_vector_length() argument
810 if (!sve_vl_valid(vl)) in vec_set_vector_length()
819 if (vl > VL_ARCH_MAX) in vec_set_vector_length()
820 vl = VL_ARCH_MAX; in vec_set_vector_length()
822 vl = find_supported_vector_length(type, vl); in vec_set_vector_length()
826 task_set_vl_onexec(task, type, vl); in vec_set_vector_length()
835 if (vl == task_get_vl(task, type)) in vec_set_vector_length()
871 task_set_vl(task, type, vl); in vec_set_vector_length()
905 unsigned long vl, flags; in sve_set_current_vl() local
908 vl = arg & PR_SVE_VL_LEN_MASK; in sve_set_current_vl()
909 flags = arg & ~vl; in sve_set_current_vl()
914 ret = vec_set_vector_length(current, ARM64_VEC_SVE, vl, flags); in sve_set_current_vl()
934 unsigned long vl, flags; in sme_set_current_vl() local
937 vl = arg & PR_SME_VL_LEN_MASK; in sme_set_current_vl()
938 flags = arg & ~vl; in sme_set_current_vl()
943 ret = vec_set_vector_length(current, ARM64_VEC_SME, vl, flags); in sme_set_current_vl()
963 unsigned int vq, vl; in vec_probe_vqs() local
972 vl = sve_get_vl(); in vec_probe_vqs()
975 vl = sme_get_vl(); in vec_probe_vqs()
978 vl = 0; in vec_probe_vqs()
983 if (sve_vq_from_vl(vl) > vq) in vec_probe_vqs()
986 vq = sve_vq_from_vl(vl); /* skip intervening lengths */ in vec_probe_vqs()
1531 int vl, supported_vl; in fpsimd_flush_thread_vl() local
1543 vl = task_get_vl_onexec(current, type); in fpsimd_flush_thread_vl()
1544 if (!vl) in fpsimd_flush_thread_vl()
1545 vl = get_default_vl(type); in fpsimd_flush_thread_vl()
1547 if (WARN_ON(!sve_vl_valid(vl))) in fpsimd_flush_thread_vl()
1548 vl = vl_info[type].min_vl; in fpsimd_flush_thread_vl()
1550 supported_vl = find_supported_vector_length(type, vl); in fpsimd_flush_thread_vl()
1551 if (WARN_ON(supported_vl != vl)) in fpsimd_flush_thread_vl()
1552 vl = supported_vl; in fpsimd_flush_thread_vl()
1554 task_set_vl(current, type, vl); in fpsimd_flush_thread_vl()