summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/processor.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-04-19 12:22:23 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2022-04-22 18:51:02 +0100
commit0033cd9339642f9b7bef23f96aa2e7277ab51cce (patch)
treef5c437cd6e6c4cd3f0f5a8d7c0e690d5b358f6a2 /arch/arm64/include/asm/processor.h
parentaf7167d6d2675f3343eff3ad6c9b4a8e30122e2c (diff)
downloadlinux-0033cd9339642f9b7bef23f96aa2e7277ab51cce.tar.bz2
arm64/sme: Implement ZA context switching
Allocate space for storing ZA on first access to SME and use that to save and restore ZA state when context switching. We do this by using the vector form of the LDR and STR ZA instructions, these do not require streaming mode and have implementation recommendations that they avoid contention issues in shared SMCU implementations. Since ZA is architecturally guaranteed to be zeroed when enabled we do not need to explicitly zero ZA, either we will be restoring from a saved copy or trapping on first use of SME so we know that ZA must be disabled. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220419112247.711548-16-broonie@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/processor.h')
-rw-r--r--arch/arm64/include/asm/processor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index 7542310b4e6b..6a3a6c3dec90 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -154,6 +154,7 @@ struct thread_struct {
unsigned int fpsimd_cpu;
void *sve_state; /* SVE registers, if any */
+ void *za_state; /* ZA register, if any */
unsigned int vl[ARM64_VEC_MAX]; /* vector length */
unsigned int vl_onexec[ARM64_VEC_MAX]; /* vl after next exec */
unsigned long fault_address; /* fault info */