]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: ssbd: Skip apply_ssbd if not using dynamic mitigation
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 29 May 2018 12:11:11 +0000 (13:11 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 31 May 2018 16:35:06 +0000 (17:35 +0100)
commit35849a5ed77267c5024c8d554fdf4bf84ec8c648
tree5e6854564b23aaccb709b9af04891a7c53dddbb0
parent617cf805ce1fd59185ef0dacbba3d284d9dfadbd
arm64: ssbd: Skip apply_ssbd if not using dynamic mitigation

In order to avoid checking arm64_ssbd_callback_required on each
kernel entry/exit even if no mitigation is required, let's
add yet another alternative that by default jumps over the mitigation,
and that gets nop'ed out if we're doing dynamic mitigation.

Think of it as a poor man's static key...

Reviewed-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/entry.S