diff options
author | Dave Martin <Dave.Martin@arm.com> | 2019-04-11 16:53:18 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2019-04-18 17:14:01 +0100 |
commit | 624835abf9e26bf27e627fd54c2a2b36972b14f0 (patch) | |
tree | 7daedcd61af61601b449709cb15901d1238c771e /arch/arm64/include/asm/fpsimd.h | |
parent | 5d8d4af24460d079ecdb190254b14b528add1228 (diff) | |
download | linux-stable-624835abf9e26bf27e627fd54c2a2b36972b14f0.tar.gz linux-stable-624835abf9e26bf27e627fd54c2a2b36972b14f0.tar.bz2 linux-stable-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/include/asm/fpsimd.h')
-rw-r--r-- | arch/arm64/include/asm/fpsimd.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h index ad6d2e41eb37..df62bbd33a9a 100644 --- a/arch/arm64/include/asm/fpsimd.h +++ b/arch/arm64/include/asm/fpsimd.h @@ -92,7 +92,6 @@ extern u64 read_zcr_features(void); extern int __ro_after_init sve_max_vl; extern int __ro_after_init sve_max_virtualisable_vl; -/* Set of available vector lengths, as vq_to_bit(vq): */ extern __ro_after_init DECLARE_BITMAP(sve_vq_map, SVE_VQ_MAX); /* @@ -107,9 +106,6 @@ static inline unsigned int __vq_to_bit(unsigned int vq) static inline unsigned int __bit_to_vq(unsigned int bit) { - if (WARN_ON(bit >= SVE_VQ_MAX)) - bit = SVE_VQ_MAX - 1; - return SVE_VQ_MAX - bit; } |