x86/speculation: Merge one test in spectre_v2_user_select_mitigation()
authorBorislav Petkov <bp@suse.de>
Mon, 15 Jun 2020 06:51:25 +0000 (08:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2022 09:13:27 +0000 (10:13 +0100)
commitbd63aa4ff3c9113ff0a97023b6e688e0b37e6fb4
treec9805187d5281846ae8a735e2319594552cbd8b4
parentc9fcc1545c3bb19f4e04b1c82bf5c2856fef39bd
x86/speculation: Merge one test in spectre_v2_user_select_mitigation()

commit a5ce9f2bb665d1d2b31f139a02dbaa2dfbb62fa6 upstream.

Merge the test whether the CPU supports STIBP into the test which
determines whether STIBP is required. Thus try to simplify what is
already an insane logic.

Remove a superfluous newline in a comment, while at it.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Anthony Steinhauser <asteinhauser@google.com>
Link: https://lkml.kernel.org/r/20200615065806.GB14668@zn.tnic
[fllinden@amazon.com: fixed contextual conflict (comment) for 4.14]
Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/bugs.c