summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/ipl.c
diff options
context:
space:
mode:
authorMartin Schwidefsky2018-01-16 07:11:45 +0100
committerMartin Schwidefsky2018-02-05 13:49:17 +0100
commitd768bd892fc8f066cd3aa000eb1867bcf32db0ee (patch)
tree73856bebc552b175d71bef6859824d7ca8d8e051 /arch/s390/kernel/ipl.c
parents390/alternative: use a copy of the facility bit mask (diff)
downloadkernel-qcow2-linux-d768bd892fc8f066cd3aa000eb1867bcf32db0ee.tar.gz
kernel-qcow2-linux-d768bd892fc8f066cd3aa000eb1867bcf32db0ee.tar.xz
kernel-qcow2-linux-d768bd892fc8f066cd3aa000eb1867bcf32db0ee.zip
s390: add options to change branch prediction behaviour for the kernel
Add the PPA instruction to the system entry and exit path to switch the kernel to a different branch prediction behaviour. The instructions are added via CPU alternatives and can be disabled with the "nospec" or the "nobp=0" kernel parameter. If the default behaviour selected with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be used to enable the changed kernel branch prediction. Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/ipl.c')
-rw-r--r--arch/s390/kernel/ipl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index da5cc3b469aa..34477c1aee6d 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -543,6 +543,7 @@ static struct kset *ipl_kset;
static void __ipl_run(void *unused)
{
+ __bpon();
diag308(DIAG308_LOAD_CLEAR, NULL);
if (MACHINE_IS_VM)
__cpcmd("IPL", NULL, 0, NULL);