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:27:01 +0000 (11:27 +0200)
commit82b05f0838aa43281782cac2fb58c29144c66643
tree22c26efa185655e480b3458f6328b07c4c015f8a
parent7d44b707aaff05630bc6b5c5b497e696730a15e3
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/process.c