diff options
author | Michal Suchanek <msuchanek@suse.de> | 2019-03-29 22:25:51 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 06:25:12 +0200 |
commit | ae082ed4702e31ed833b7b40b1afe4ce11adb6b4 (patch) | |
tree | be40b55cc4d0464e76c24261abd94599d110de36 /arch/powerpc/platforms | |
parent | 31c3a1e81171f03c7df48aac3efc1d417a18c708 (diff) | |
download | linux-stable-ae082ed4702e31ed833b7b40b1afe4ce11adb6b4.tar.gz linux-stable-ae082ed4702e31ed833b7b40b1afe4ce11adb6b4.tar.bz2 linux-stable-ae082ed4702e31ed833b7b40b1afe4ce11adb6b4.zip |
powerpc/64s: Enable barrier_nospec based on firmware settings
commit cb3d6759a93c6d0aea1c10deb6d00e111c29c19c upstream.
Check what firmware told us and enable/disable the barrier_nospec as
appropriate.
We err on the side of enabling the barrier, as it's no-op on older
systems, see the comment for more detail.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powernv/setup.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index fd143c934768..e6f8505a3818 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -123,6 +123,7 @@ static void pnv_setup_rfi_flush(void) security_ftr_enabled(SEC_FTR_L1D_FLUSH_HV)); setup_rfi_flush(type, enable); + setup_barrier_nospec(); } static void __init pnv_setup_arch(void) diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 45f814041448..ac12ec4d839d 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -534,6 +534,7 @@ void pseries_setup_rfi_flush(void) security_ftr_enabled(SEC_FTR_L1D_FLUSH_PR); setup_rfi_flush(types, enable); + setup_barrier_nospec(); } static void __init pSeries_setup_arch(void) |