arm64: entry: Make the trampoline cleanup optional
authorJames Morse <james.morse@arm.com>
Wed, 24 Nov 2021 15:36:12 +0000 (15:36 +0000)
committerJames Morse <james.morse@arm.com>
Tue, 15 Feb 2022 17:38:46 +0000 (17:38 +0000)
commitd739da1694a0eaef0358a42b76904b611539b77b
tree257c605a5f73b7754ba9b0be9a513f2785185312
parent5bdf3437603d4af87f9c7f424b0c8aeed2420745
arm64: entry: Make the trampoline cleanup optional

Subsequent patches will add additional sets of vectors that use
the same tricks as the kpti vectors to reach the full-fat vectors.
The full-fat vectors contain some cleanup for kpti that is patched
in by alternatives when kpti is in use. Once there are additional
vectors, the cleanup will be needed in more cases.

But on big/little systems, the cleanup would be harmful if no
trampoline vector were in use. Instead of forcing CPUs that don't
need a trampoline vector to use one, make the trampoline cleanup
optional.

Entry at the top of the vectors will skip the cleanup. The trampoline
vectors can then skip the first instruction, triggering the cleanup
to run.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
arch/arm64/kernel/entry.S