diff options
Diffstat (limited to 'include/linux/init.h')
-rw-r--r-- | include/linux/init.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/init.h b/include/linux/init.h index 0e06c176f185..13b633ed695e 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/section-names.h> | ||
6 | #include <linux/stringify.h> | ||
7 | 5 | ||
8 | /* These macros are used to mark some functions or | 6 | /* These macros are used to mark some functions or |
9 | * initialized data (doesn't apply to uninitialized data) | 7 | * initialized data (doesn't apply to uninitialized data) |
@@ -31,7 +29,7 @@ | |||
31 | * sign followed by value, e.g.: | 29 | * sign followed by value, e.g.: |
32 | * | 30 | * |
33 | * static int init_variable __initdata = 0; | 31 | * static int init_variable __initdata = 0; |
34 | * static char linux_logo[] __initdata = { 0x32, 0x36, ... }; | 32 | * static const char linux_logo[] __initconst = { 0x32, 0x36, ... }; |
35 | * | 33 | * |
36 | * Don't forget to initialize data not at file scope, i.e. within a function, | 34 | * Don't forget to initialize data not at file scope, i.e. within a function, |
37 | * as gcc otherwise puts the data into the bss section and not into the init | 35 | * as gcc otherwise puts the data into the bss section and not into the init |
@@ -101,7 +99,7 @@ | |||
101 | #define __memexitconst __section(.memexit.rodata) | 99 | #define __memexitconst __section(.memexit.rodata) |
102 | 100 | ||
103 | /* For assembly routines */ | 101 | /* For assembly routines */ |
104 | #define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax" | 102 | #define __HEAD .section ".head.text","ax" |
105 | #define __INIT .section ".init.text","ax" | 103 | #define __INIT .section ".init.text","ax" |
106 | #define __FINIT .previous | 104 | #define __FINIT .previous |
107 | 105 | ||
@@ -136,6 +134,9 @@ typedef void (*exitcall_t)(void); | |||
136 | extern initcall_t __con_initcall_start[], __con_initcall_end[]; | 134 | extern initcall_t __con_initcall_start[], __con_initcall_end[]; |
137 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 135 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
138 | 136 | ||
137 | /* Used for contructor calls. */ | ||
138 | typedef void (*ctor_fn_t)(void); | ||
139 | |||
139 | /* Defined in init/main.c */ | 140 | /* Defined in init/main.c */ |
140 | extern int do_one_initcall(initcall_t fn); | 141 | extern int do_one_initcall(initcall_t fn); |
141 | extern char __initdata boot_command_line[]; | 142 | extern char __initdata boot_command_line[]; |
@@ -225,7 +226,8 @@ struct obs_kernel_param { | |||
225 | * obs_kernel_param "array" too far apart in .init.setup. | 226 | * obs_kernel_param "array" too far apart in .init.setup. |
226 | */ | 227 | */ |
227 | #define __setup_param(str, unique_id, fn, early) \ | 228 | #define __setup_param(str, unique_id, fn, early) \ |
228 | static char __setup_str_##unique_id[] __initdata __aligned(1) = str; \ | 229 | static const char __setup_str_##unique_id[] __initconst \ |
230 | __aligned(1) = str; \ | ||
229 | static struct obs_kernel_param __setup_##unique_id \ | 231 | static struct obs_kernel_param __setup_##unique_id \ |
230 | __used __section(.init.setup) \ | 232 | __used __section(.init.setup) \ |
231 | __attribute__((aligned((sizeof(long))))) \ | 233 | __attribute__((aligned((sizeof(long))))) \ |