summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-07-28 09:06:34 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2018-08-08 00:32:23 +1000
commit179ab1cbf883575c3a585bcfc0f2160f1d22a149 (patch)
treeeead3ee74946fc0b174966ef4fcf1fa02ae8e2fc /arch/powerpc/lib
parent6453b532f2c8856a80381e6b9a1f5ea2f12294df (diff)
downloadlinux-179ab1cbf883575c3a585bcfc0f2160f1d22a149.tar.gz
linux-179ab1cbf883575c3a585bcfc0f2160f1d22a149.tar.bz2
linux-179ab1cbf883575c3a585bcfc0f2160f1d22a149.zip
powerpc/64: Add CONFIG_PPC_BARRIER_NOSPEC
Add a config symbol to encode which platforms support the barrier_nospec speculation barrier. Currently this is just Book3S 64 but we will add Book3E in a future patch. Signed-off-by: Diana Craciun <diana.craciun@nxp.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/feature-fixups.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index 8b69f868298c..0e604b41b5d1 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -304,6 +304,9 @@ void do_barrier_nospec_fixups_range(bool enable, void *fixup_start, void *fixup_
printk(KERN_DEBUG "barrier-nospec: patched %d locations\n", i);
}
+#endif /* CONFIG_PPC_BOOK3S_64 */
+
+#ifdef CONFIG_PPC_BARRIER_NOSPEC
void do_barrier_nospec_fixups(bool enable)
{
void *start, *end;
@@ -313,8 +316,7 @@ void do_barrier_nospec_fixups(bool enable)
do_barrier_nospec_fixups_range(enable, start, end);
}
-
-#endif /* CONFIG_PPC_BOOK3S_64 */
+#endif /* CONFIG_PPC_BARRIER_NOSPEC */
void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
{