From: Diana Craciun Date: Fri, 29 Mar 2019 11:26:16 +0000 (+1100) Subject: powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used X-Git-Tag: v4.14.110~57 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=feafb29fe0ce9f090a3f7a202d7fb09a15308059;p=wrapfs-2.6.38.y.git powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used commit 3bc8ea8603ae4c1e09aca8de229ad38b8091fcb3 upstream. If the user choses not to use the mitigations, replace the code sequence with nops. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index ab7a75b731da..c58364c74dad 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -938,6 +938,7 @@ void __init setup_arch(char **cmdline_p) ppc_md.setup_arch(); setup_barrier_nospec(); + setup_spectre_v2(); paging_init();