]>
Commit | Line | Data |
---|---|---|
1f91e7a4 GKH |
1 | From foo@baz Tue 14 May 2019 08:29:35 PM CEST |
2 | From: Andi Kleen <ak@linux.intel.com> | |
3 | Date: Fri, 29 Mar 2019 17:47:43 -0700 | |
4 | Subject: x86/cpu/bugs: Use __initconst for 'const' init data | |
5 | ||
6 | From: Andi Kleen <ak@linux.intel.com> | |
7 | ||
8 | commit 1de7edbb59c8f1b46071f66c5c97b8a59569eb51 upstream. | |
9 | ||
10 | Some of the recently added const tables use __initdata which causes section | |
11 | attribute conflicts. | |
12 | ||
13 | Use __initconst instead. | |
14 | ||
15 | Fixes: fa1202ef2243 ("x86/speculation: Add command line control") | |
16 | Signed-off-by: Andi Kleen <ak@linux.intel.com> | |
17 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | |
18 | Link: https://lkml.kernel.org/r/20190330004743.29541-9-andi@firstfloor.org | |
19 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
21 | --- | |
22 | arch/x86/kernel/cpu/bugs.c | 6 +++--- | |
23 | 1 file changed, 3 insertions(+), 3 deletions(-) | |
24 | ||
25 | --- a/arch/x86/kernel/cpu/bugs.c | |
26 | +++ b/arch/x86/kernel/cpu/bugs.c | |
27 | @@ -315,7 +315,7 @@ static const struct { | |
28 | const char *option; | |
29 | enum spectre_v2_user_cmd cmd; | |
30 | bool secure; | |
31 | -} v2_user_options[] __initdata = { | |
32 | +} v2_user_options[] __initconst = { | |
33 | { "auto", SPECTRE_V2_USER_CMD_AUTO, false }, | |
34 | { "off", SPECTRE_V2_USER_CMD_NONE, false }, | |
35 | { "on", SPECTRE_V2_USER_CMD_FORCE, true }, | |
36 | @@ -451,7 +451,7 @@ static const struct { | |
37 | const char *option; | |
38 | enum spectre_v2_mitigation_cmd cmd; | |
39 | bool secure; | |
40 | -} mitigation_options[] __initdata = { | |
41 | +} mitigation_options[] __initconst = { | |
42 | { "off", SPECTRE_V2_CMD_NONE, false }, | |
43 | { "on", SPECTRE_V2_CMD_FORCE, true }, | |
44 | { "retpoline", SPECTRE_V2_CMD_RETPOLINE, false }, | |
45 | @@ -723,7 +723,7 @@ static const char * const ssb_strings[] | |
46 | static const struct { | |
47 | const char *option; | |
48 | enum ssb_mitigation_cmd cmd; | |
49 | -} ssb_mitigation_options[] __initdata = { | |
50 | +} ssb_mitigation_options[] __initconst = { | |
51 | { "auto", SPEC_STORE_BYPASS_CMD_AUTO }, /* Platform decides */ | |
52 | { "on", SPEC_STORE_BYPASS_CMD_ON }, /* Disable Speculative Store Bypass */ | |
53 | { "off", SPEC_STORE_BYPASS_CMD_NONE }, /* Don't touch Speculative Store Bypass */ |