diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2020-04-17 18:29:35 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2020-09-04 12:46:07 +0100 |
commit | 39d08e8318c49c5fd2bda9cadfd2bc54d2d3dfd8 (patch) | |
tree | b0f2c41789a84a807067ba1ed25d3308ae06ded1 /arch/arm64/kernel/mte.c | |
parent | af5ce95282dc99d08a27a407a02c763dde1c5558 (diff) | |
download | linux-39d08e8318c49c5fd2bda9cadfd2bc54d2d3dfd8.tar.bz2 |
arm64: mte: Restore the GCR_EL1 register after a suspend
The CPU resume/suspend routines only take care of the common system
registers. Restore GCR_EL1 in addition via the __cpu_suspend_exit()
function.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'arch/arm64/kernel/mte.c')
-rw-r--r-- | arch/arm64/kernel/mte.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c index 07798b8d5039..09cf76fc1090 100644 --- a/arch/arm64/kernel/mte.c +++ b/arch/arm64/kernel/mte.c @@ -116,6 +116,14 @@ void mte_thread_switch(struct task_struct *next) update_gcr_el1_excl(next->thread.gcr_user_incl); } +void mte_suspend_exit(void) +{ + if (!system_supports_mte()) + return; + + update_gcr_el1_excl(current->thread.gcr_user_incl); +} + long set_mte_ctrl(unsigned long arg) { u64 tcf0; |