2024-01-15 19:53:42

by Mark Brown

[permalink] [raw]
Subject: [PATCH] arm64/fpsimd: Remove spurious check for SVE support

There is no need to check for SVE support when changing vector lengths,
even if the system is SME only we still need SVE storage for the streaming
SVE state.

Fixes: d4d5be94a878 (arm64/fpsimd: Ensure SME storage is allocated after SVE VL changes)
Signed-off-by: Mark Brown <[email protected]>
---
arch/arm64/kernel/fpsimd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 1559c706d32d..66b31cebead8 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -924,10 +924,8 @@ int vec_set_vector_length(struct task_struct *task, enum vec_type type,
* allocate SVE now in case it is needed for use in streaming
* mode.
*/
- if (system_supports_sve()) {
- sve_free(task);
- sve_alloc(task, true);
- }
+ sve_free(task);
+ sve_alloc(task, true);

if (free_sme)
sme_free(task);

---
base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a
change-id: 20240110-arm64-sve-enabled-check-73cdc0b7d998

Best regards,
--
Mark Brown <[email protected]>



2024-01-18 12:02:43

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH] arm64/fpsimd: Remove spurious check for SVE support

On Mon, 15 Jan 2024 19:53:01 +0000, Mark Brown wrote:
> There is no need to check for SVE support when changing vector lengths,
> even if the system is SME only we still need SVE storage for the streaming
> SVE state.
>
>

Applied to arm64 (for-next/core), thanks!

[1/1] arm64/fpsimd: Remove spurious check for SVE support
https://git.kernel.org/arm64/c/8410186ca480

Cheers,
--
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev