powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used
authorDiana Craciun <diana.craciun@nxp.com>
Wed, 12 Dec 2018 14:03:08 +0000 (16:03 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Dec 2018 11:59:03 +0000 (22:59 +1100)
If the user choses not to use the mitigations, replace
the code sequence with nops.

Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/setup-common.c

index 4fe7740917a768af0619a815819543f7b352e714..ca00fbb97cf898966f5f053ce8e7dc300e7c4bc9 100644 (file)
@@ -974,6 +974,7 @@ void __init setup_arch(char **cmdline_p)
                ppc_md.setup_arch();
 
        setup_barrier_nospec();
+       setup_spectre_v2();
 
        paging_init();