arm64/fpsimd: Exit streaming mode when flushing tasks
authorMark Brown <broonie@kernel.org>
Fri, 9 Jun 2023 22:43:41 +0000 (23:43 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 16 Jun 2023 17:43:09 +0000 (18:43 +0100)
commitaf3215fd02308c9aa982a028284d6414eeb60c04
tree4878fbde35330bdedf31015541c794a62ace95e3
parentab9b4008092c86dc12497af155a0901cc1156999
arm64/fpsimd: Exit streaming mode when flushing tasks

Ensure there is no path where we might attempt to save SME state after we
flush a task by updating the SVCR register state as well as updating our
in memory state. I haven't seen a specific case where this is happening or
seen a path where it might happen but for the cost of a single low overhead
instruction it seems sensible to close the potential gap.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230607-arm64-flush-svcr-v2-1-827306001841@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/fpsimd.c