Skip to content

Commit 0cab5b4

Browse files
brooniewilldeacon
authored andcommitted
arm64/sme: Fix context switch for SME only systems
When refactoring fpsimd_load() to support keeping SVE enabled over syscalls support for systems with SME but not SVE was broken. The code that selects between loading regular FPSIMD and SVE states was guarded by using system_supports_sve() but is also needed to handle the streaming SVE state in SME only systems where that check will be false. Fix this by also checking for system_supports_sme(). Fixes: a0136be ("arm64/fpsimd: Load FP state based on recorded data type") Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 031af50 commit 0cab5b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/fpsimd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static void task_fpsimd_load(void)
385385
WARN_ON(!system_supports_fpsimd());
386386
WARN_ON(!have_cpu_fpsimd_context());
387387

388-
if (system_supports_sve()) {
388+
if (system_supports_sve() || system_supports_sme()) {
389389
switch (current->thread.fp_type) {
390390
case FP_STATE_FPSIMD:
391391
/* Stop tracking SVE for this task until next use. */

0 commit comments

Comments
 (0)