Skip to content

Commit 059613f

Browse files
brooniewilldeacon
authored andcommitted
arm64/sve: Rename find_supported_vector_length()
The function has SVE specific checks in it and it will be more trouble to add conditional code for SME than it is to simply rename it to be SVE specific. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 9f58486 commit 059613f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/arm64/kernel/fpsimd.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static void fpsimd_save(void)
337337
* If things go wrong there's a bug somewhere, but try to fall back to a
338338
* safe choice.
339339
*/
340-
static unsigned int find_supported_vector_length(unsigned int vl)
340+
static unsigned int find_supported_sve_vector_length(unsigned int vl)
341341
{
342342
int bit;
343343
int max_vl = sve_max_vl;
@@ -379,7 +379,7 @@ static int sve_proc_do_default_vl(struct ctl_table *table, int write,
379379
if (!sve_vl_valid(vl))
380380
return -EINVAL;
381381

382-
set_sve_default_vl(find_supported_vector_length(vl));
382+
set_sve_default_vl(find_supported_sve_vector_length(vl));
383383
return 0;
384384
}
385385

@@ -598,7 +598,7 @@ int sve_set_vector_length(struct task_struct *task,
598598
if (vl > SVE_VL_ARCH_MAX)
599599
vl = SVE_VL_ARCH_MAX;
600600

601-
vl = find_supported_vector_length(vl);
601+
vl = find_supported_sve_vector_length(vl);
602602

603603
if (flags & (PR_SVE_VL_INHERIT |
604604
PR_SVE_SET_VL_ONEXEC))
@@ -873,14 +873,14 @@ void __init sve_setup(void)
873873
* Sanity-check that the max VL we determined through CPU features
874874
* corresponds properly to sve_vq_map. If not, do our best:
875875
*/
876-
if (WARN_ON(sve_max_vl != find_supported_vector_length(sve_max_vl)))
877-
sve_max_vl = find_supported_vector_length(sve_max_vl);
876+
if (WARN_ON(sve_max_vl != find_supported_sve_vector_length(sve_max_vl)))
877+
sve_max_vl = find_supported_sve_vector_length(sve_max_vl);
878878

879879
/*
880880
* For the default VL, pick the maximum supported value <= 64.
881881
* VL == 64 is guaranteed not to grow the signal frame.
882882
*/
883-
set_sve_default_vl(find_supported_vector_length(64));
883+
set_sve_default_vl(find_supported_sve_vector_length(64));
884884

885885
bitmap_andnot(tmp_map, sve_vq_partial_map, sve_vq_map,
886886
SVE_VQ_MAX);
@@ -1066,7 +1066,7 @@ void fpsimd_flush_thread(void)
10661066
if (WARN_ON(!sve_vl_valid(vl)))
10671067
vl = SVE_VL_MIN;
10681068

1069-
supported_vl = find_supported_vector_length(vl);
1069+
supported_vl = find_supported_sve_vector_length(vl);
10701070
if (WARN_ON(supported_vl != vl))
10711071
vl = supported_vl;
10721072

0 commit comments

Comments
 (0)