diff options
author | Dave Martin | 2019-04-11 17:53:18 +0200 |
---|---|---|
committer | Marc Zyngier | 2019-04-18 18:14:01 +0200 |
commit | 624835abf9e26bf27e627fd54c2a2b36972b14f0 (patch) | |
tree | 7daedcd61af61601b449709cb15901d1238c771e /arch/arm64/kernel | |
parent | arm64: KVM: Fix system register enumeration (diff) | |
download | kernel-qcow2-linux-624835abf9e26bf27e627fd54c2a2b36972b14f0.tar.gz kernel-qcow2-linux-624835abf9e26bf27e627fd54c2a2b36972b14f0.tar.xz kernel-qcow2-linux-624835abf9e26bf27e627fd54c2a2b36972b14f0.zip |
arm64/sve: Clarify vq map semantics
Currently the meanings of sve_vq_map and the ancillary helpers
__bit_to_vq() and __vq_to_bit() are not clearly explained.
This patch makes the explanatory comment clearer, and removes the
duplicate comment from fpsimd.h.
The WARN_ON() currently present in __bit_to_vq() confuses the
intended use of this helper. Since these are low-level helpers not
intended for general-purpose use anyway, it is better not to make
guesses about how these functions will be used: rather, this patch
removes the WARN_ON() and relies on callers to use the helpers
sensibly.
Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/fpsimd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 577296bba730..56afa40263d9 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -135,10 +135,15 @@ static int sve_default_vl = -1; /* Maximum supported vector length across all CPUs (initially poisoned) */ int __ro_after_init sve_max_vl = SVE_VL_MIN; int __ro_after_init sve_max_virtualisable_vl = SVE_VL_MIN; -/* Set of available vector lengths, as vq_to_bit(vq): */ + +/* + * Set of available vector lengths, + * where length vq encoded as bit __vq_to_bit(vq): + */ __ro_after_init DECLARE_BITMAP(sve_vq_map, SVE_VQ_MAX); /* Set of vector lengths present on at least one cpu: */ static __ro_after_init DECLARE_BITMAP(sve_vq_partial_map, SVE_VQ_MAX); + static void __percpu *efi_sve_state; #else /* ! CONFIG_ARM64_SVE */ |