arm64: Move handling of erratum 1418040 into C code
authorMarc Zyngier <maz@kernel.org>
Fri, 31 Jul 2020 17:38:23 +0000 (18:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:38 +0000 (11:29 +0200)
commite028fa961a3acf7b4a5b774ac1ae403fa3f93405
tree61fe9c162f3a8b68048732bec33659bc894728ce
parent736d8a6a73be34333e6df0849c8d0efe41ea6ac1
arm64: Move handling of erratum 1418040 into C code

[ Upstream commit d49f7d7376d0c0daf8680984a37bd07581ac7d38 ]

Instead of dealing with erratum 1418040 on each entry and exit,
let's move the handling to __switch_to() instead, which has
several advantages:

- It can be applied when it matters (switching between 32 and 64
  bit tasks).
- It is written in C (yay!)
- It can rely on static keys rather than alternatives

Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200731173824.107480-2-maz@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kernel/entry.S
arch/arm64/kernel/process.c