diff options
author | Mark Brown <broonie@kernel.org> | 2021-10-19 19:22:12 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-10-21 11:18:17 +0200 |
commit | b5bc00ffddc08c20a799514cbcfd2abaa6718014 (patch) | |
tree | 2a6acc3ce376434c59c128e7c9430e3054f135ed /arch/arm64/include/asm/processor.h | |
parent | arm64/sve: Use accessor functions for vector lengths in thread_struct (diff) | |
download | linux-b5bc00ffddc08c20a799514cbcfd2abaa6718014.tar.xz linux-b5bc00ffddc08c20a799514cbcfd2abaa6718014.zip |
arm64/sve: Put system wide vector length information into structs
With the introduction of SME we will have a second vector length in the
system, enumerated and configured in a very similar fashion to the
existing SVE vector length. While there are a few differences in how
things are handled this is a relatively small portion of the overall
code so in order to avoid code duplication we factor out
We create two structs, one vl_info for the static hardware properties
and one vl_config for the runtime configuration, with an array
instantiated for each and update all the users to reference these. Some
accessor functions are provided where helpful for readability, and the
write to set the vector length is put into a function since the system
register being updated needs to be chosen at compile time.
This is a mostly mechanical replacement, further work will be required
to actually make things generic, ensuring that we handle those places
where there are differences properly.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-8-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/processor.h')
-rw-r--r-- | arch/arm64/include/asm/processor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index adb6a46a1fae..fb0608fe9ded 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -115,6 +115,11 @@ struct debug_info { #endif }; +enum vec_type { + ARM64_VEC_SVE = 0, + ARM64_VEC_MAX, +}; + struct cpu_context { unsigned long x19; unsigned long x20; |