File tree Expand file tree Collapse file tree 3 files changed +29
-25
lines changed Expand file tree Collapse file tree 3 files changed +29
-25
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o als.o
61
61
obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o
62
62
obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o
63
63
obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o
64
+ obj-y += nospec-branch.o
64
65
65
66
extra-y += head.o head64.o vmlinux.lds
66
67
67
- obj-$(CONFIG_EXPOLINE) += nospec-branch.o
68
- CFLAGS_REMOVE_expoline.o += $(CC_FLAGS_EXPOLINE )
68
+ CFLAGS_REMOVE_nospec-branch.o += $(CC_FLAGS_EXPOLINE )
69
69
70
70
obj-$(CONFIG_MODULES) += module.o
71
71
obj-$(CONFIG_SMP) += smp.o
Original file line number Diff line number Diff line change @@ -15,29 +15,6 @@ static int __init disable_alternative_instructions(char *str)
15
15
16
16
early_param ("noaltinstr" , disable_alternative_instructions );
17
17
18
- static int __init nobp_setup_early (char * str )
19
- {
20
- bool enabled ;
21
- int rc ;
22
-
23
- rc = kstrtobool (str , & enabled );
24
- if (rc )
25
- return rc ;
26
- if (enabled && test_facility (82 ))
27
- __set_facility (82 , S390_lowcore .alt_stfle_fac_list );
28
- else
29
- __clear_facility (82 , S390_lowcore .alt_stfle_fac_list );
30
- return 0 ;
31
- }
32
- early_param ("nobp" , nobp_setup_early );
33
-
34
- static int __init nospec_setup_early (char * str )
35
- {
36
- __clear_facility (82 , S390_lowcore .alt_stfle_fac_list );
37
- return 0 ;
38
- }
39
- early_param ("nospec" , nospec_setup_early );
40
-
41
18
struct brcl_insn {
42
19
u16 opc ;
43
20
s32 disp ;
Original file line number Diff line number Diff line change 2
2
#include <linux/module.h>
3
3
#include <asm/nospec-branch.h>
4
4
5
+ static int __init nobp_setup_early (char * str )
6
+ {
7
+ bool enabled ;
8
+ int rc ;
9
+
10
+ rc = kstrtobool (str , & enabled );
11
+ if (rc )
12
+ return rc ;
13
+ if (enabled && test_facility (82 ))
14
+ __set_facility (82 , S390_lowcore .alt_stfle_fac_list );
15
+ else
16
+ __clear_facility (82 , S390_lowcore .alt_stfle_fac_list );
17
+ return 0 ;
18
+ }
19
+ early_param ("nobp" , nobp_setup_early );
20
+
21
+ static int __init nospec_setup_early (char * str )
22
+ {
23
+ __clear_facility (82 , S390_lowcore .alt_stfle_fac_list );
24
+ return 0 ;
25
+ }
26
+ early_param ("nospec" , nospec_setup_early );
27
+
28
+ #ifdef CONFIG_EXPOLINE
29
+
5
30
int nospec_call_disable = IS_ENABLED (CONFIG_EXPOLINE_OFF );
6
31
int nospec_return_disable = !IS_ENABLED (CONFIG_EXPOLINE_FULL );
7
32
@@ -98,3 +123,5 @@ void __init nospec_init_branches(void)
98
123
nospec_call_revert (__nospec_call_start , __nospec_call_end );
99
124
nospec_return_revert (__nospec_return_start , __nospec_return_end );
100
125
}
126
+
127
+ #endif /* CONFIG_EXPOLINE */
You can’t perform that action at this time.
0 commit comments