Lines Matching refs:vl
257 return task->thread.vl[type]; in task_get_vl()
261 unsigned long vl) in task_set_vl() argument
263 task->thread.vl[type] = vl; in task_set_vl()
273 unsigned long vl) in task_set_vl_onexec() argument
275 task->thread.vl_onexec[type] = vl; in task_set_vl_onexec()
448 unsigned int vl; in fpsimd_save_user_state() local
472 vl = last->sve_vl; in fpsimd_save_user_state()
488 vl = last->sme_vl; in fpsimd_save_user_state()
494 if (WARN_ON(sve_get_vl() != vl)) { in fpsimd_save_user_state()
505 sve_ffr_offset(vl), in fpsimd_save_user_state()
521 unsigned int vl) in find_supported_vector_length() argument
527 if (WARN_ON(!sve_vl_valid(vl))) in find_supported_vector_length()
528 vl = info->min_vl; in find_supported_vector_length()
533 if (vl > max_vl) in find_supported_vector_length()
534 vl = max_vl; in find_supported_vector_length()
535 if (vl < info->min_vl) in find_supported_vector_length()
536 vl = info->min_vl; in find_supported_vector_length()
539 __vq_to_bit(sve_vq_from_vl(vl))); in find_supported_vector_length()
551 int vl = get_default_vl(type); in vec_proc_do_default_vl() local
553 .data = &vl, in vec_proc_do_default_vl()
554 .maxlen = sizeof(vl), in vec_proc_do_default_vl()
562 if (vl == -1) in vec_proc_do_default_vl()
563 vl = info->max_vl; in vec_proc_do_default_vl()
565 if (!sve_vl_valid(vl)) in vec_proc_do_default_vl()
568 set_default_vl(type, find_supported_vector_length(type, vl)); in vec_proc_do_default_vl()
687 unsigned int vq, vl; in sve_to_fpsimd() local
696 vl = thread_get_cur_vl(&task->thread); in sve_to_fpsimd()
697 vq = sve_vq_from_vl(vl); in sve_to_fpsimd()
801 unsigned long vl) in change_live_vector_length() argument
808 sme_vl = vl; in change_live_vector_length()
810 sve_vl = vl; in change_live_vector_length()
842 task_set_vl(task, type, vl); in change_live_vector_length()
862 unsigned long vl, unsigned long flags) in vec_set_vector_length() argument
871 if (!sve_vl_valid(vl)) in vec_set_vector_length()
880 if (vl > VL_ARCH_MAX) in vec_set_vector_length()
881 vl = VL_ARCH_MAX; in vec_set_vector_length()
883 vl = find_supported_vector_length(type, vl); in vec_set_vector_length()
885 if (!onexec && vl != task_get_vl(task, type)) { in vec_set_vector_length()
886 if (change_live_vector_length(task, type, vl)) in vec_set_vector_length()
891 task_set_vl_onexec(task, type, vl); in vec_set_vector_length()
927 unsigned long vl, flags; in sve_set_current_vl() local
930 vl = arg & PR_SVE_VL_LEN_MASK; in sve_set_current_vl()
931 flags = arg & ~vl; in sve_set_current_vl()
936 ret = vec_set_vector_length(current, ARM64_VEC_SVE, vl, flags); in sve_set_current_vl()
956 unsigned long vl, flags; in sme_set_current_vl() local
959 vl = arg & PR_SME_VL_LEN_MASK; in sme_set_current_vl()
960 flags = arg & ~vl; in sme_set_current_vl()
965 ret = vec_set_vector_length(current, ARM64_VEC_SME, vl, flags); in sme_set_current_vl()
985 unsigned int vq, vl; in vec_probe_vqs() local
994 vl = sve_get_vl(); in vec_probe_vqs()
997 vl = sme_get_vl(); in vec_probe_vqs()
1000 vl = 0; in vec_probe_vqs()
1005 if (sve_vq_from_vl(vl) > vq) in vec_probe_vqs()
1008 vq = sve_vq_from_vl(vl); /* skip intervening lengths */ in vec_probe_vqs()
1545 int vl, supported_vl; in fpsimd_flush_thread_vl() local
1557 vl = task_get_vl_onexec(current, type); in fpsimd_flush_thread_vl()
1558 if (!vl) in fpsimd_flush_thread_vl()
1559 vl = get_default_vl(type); in fpsimd_flush_thread_vl()
1561 if (WARN_ON(!sve_vl_valid(vl))) in fpsimd_flush_thread_vl()
1562 vl = vl_info[type].min_vl; in fpsimd_flush_thread_vl()
1564 supported_vl = find_supported_vector_length(type, vl); in fpsimd_flush_thread_vl()
1565 if (WARN_ON(supported_vl != vl)) in fpsimd_flush_thread_vl()
1566 vl = supported_vl; in fpsimd_flush_thread_vl()
1568 task_set_vl(current, type, vl); in fpsimd_flush_thread_vl()