提交 0cab5b49 编写于 作者: M Mark Brown 提交者: Will Deacon

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: a0136be4 ("arm64/fpsimd: Load FP state based on recorded data type")
Signed-off-by: NMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221223-arm64-fix-sme-only-v1-1-938d663f69e5@kernel.orgSigned-off-by: NWill Deacon <will@kernel.org>
上级 031af500
...@@ -385,7 +385,7 @@ static void task_fpsimd_load(void) ...@@ -385,7 +385,7 @@ static void task_fpsimd_load(void)
WARN_ON(!system_supports_fpsimd()); WARN_ON(!system_supports_fpsimd());
WARN_ON(!have_cpu_fpsimd_context()); WARN_ON(!have_cpu_fpsimd_context());
if (system_supports_sve()) { if (system_supports_sve() || system_supports_sme()) {
switch (current->thread.fp_type) { switch (current->thread.fp_type) {
case FP_STATE_FPSIMD: case FP_STATE_FPSIMD:
/* Stop tracking SVE for this task until next use. */ /* Stop tracking SVE for this task until next use. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册