summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/nospec-branch.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/nospec-branch.h')
-rw-r--r--arch/s390/include/asm/nospec-branch.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/include/asm/nospec-branch.h b/arch/s390/include/asm/nospec-branch.h
index b9c1f3cae842..192835a3e24d 100644
--- a/arch/s390/include/asm/nospec-branch.h
+++ b/arch/s390/include/asm/nospec-branch.h
@@ -5,8 +5,17 @@
#ifndef __ASSEMBLY__
#include <linux/types.h>
+#include <asm/facility.h>
extern int nospec_disable;
+extern int nobp;
+
+static inline bool nobp_enabled(void)
+{
+ if (__is_defined(__DECOMPRESSOR))
+ return false;
+ return nobp && test_facility(82);
+}
void nospec_init_branches(void);
void nospec_auto_detect(void);