[PATCH RFC 8/8] powerpc/64: barrier_nospec: Add commandline trigger

From: Michal Suchanek
Date: Tue Mar 13 2018 - 14:34:15 EST


Copypasta from rfi implementation

Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
---
arch/powerpc/kernel/setup_64.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 4b67b7b877d9..257f0e6be107 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -840,6 +840,14 @@ static int __init handle_no_pti(char *p)
}
early_param("nopti", handle_no_pti);

+static int __init handle_no_nospec(char *p)
+{
+ pr_info("barrier_nospec: disabled on command line.");
+ no_nospec = true;
+ return 0;
+}
+early_param("no_nospec", handle_no_nospec);
+
static void do_nothing(void *unused)
{
/*
--
2.13.6