xref: /linux/arch/s390/include/asm/nospec-branch.h (revision 001821b0e79716c4e17c71d8e053a23599a7a508)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_S390_EXPOLINE_H
3 #define _ASM_S390_EXPOLINE_H
4 
5 #ifndef __ASSEMBLY__
6 
7 #include <linux/types.h>
8 
9 extern int nospec_disable;
10 
11 void nospec_init_branches(void);
12 void nospec_auto_detect(void);
13 void nospec_revert(s32 *start, s32 *end);
14 
15 static inline bool nospec_uses_trampoline(void)
16 {
17 	return __is_defined(CC_USING_EXPOLINE) && !nospec_disable;
18 }
19 
20 #ifdef CONFIG_EXPOLINE_EXTERN
21 
22 void __s390_indirect_jump_r1(void);
23 void __s390_indirect_jump_r2(void);
24 void __s390_indirect_jump_r3(void);
25 void __s390_indirect_jump_r4(void);
26 void __s390_indirect_jump_r5(void);
27 void __s390_indirect_jump_r6(void);
28 void __s390_indirect_jump_r7(void);
29 void __s390_indirect_jump_r8(void);
30 void __s390_indirect_jump_r9(void);
31 void __s390_indirect_jump_r10(void);
32 void __s390_indirect_jump_r11(void);
33 void __s390_indirect_jump_r12(void);
34 void __s390_indirect_jump_r13(void);
35 void __s390_indirect_jump_r14(void);
36 void __s390_indirect_jump_r15(void);
37 
38 #endif
39 
40 #endif /* __ASSEMBLY__ */
41 
42 #endif /* _ASM_S390_EXPOLINE_H */
43