summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-04-24 14:15:57 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2018-06-03 20:43:45 +1000
commitcb3d6759a93c6d0aea1c10deb6d00e111c29c19c (patch)
tree7437d3e50f9ce967c0da85868121dee80f5afa3f /arch/powerpc/platforms
parent815069ca57c142eb71d27439bc27f41a433a67b3 (diff)
downloadblackbird-op-linux-cb3d6759a93c6d0aea1c10deb6d00e111c29c19c.tar.gz
blackbird-op-linux-cb3d6759a93c6d0aea1c10deb6d00e111c29c19c.zip
powerpc/64s: Enable barrier_nospec based on firmware settings
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>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/powernv/setup.c1
-rw-r--r--arch/powerpc/platforms/pseries/setup.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index fa63d3fff14c..8d0958cc83a8 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -124,6 +124,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 b55ad4286dc7..63b1f0d10ef0 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();
}
#ifdef CONFIG_PCI_IOV
OpenPOWER on IntegriCloud