diff options
Diffstat (limited to 'include/linux/init.h')
| -rw-r--r-- | include/linux/init.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/init.h b/include/linux/init.h index 21d658cdfa27..11b84e106053 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -170,6 +170,13 @@ extern void (*late_time_init)(void); | |||
| 170 | __attribute__((__section__(".initcall" level ".init"))) = fn | 170 | __attribute__((__section__(".initcall" level ".init"))) = fn |
| 171 | 171 | ||
| 172 | /* | 172 | /* |
| 173 | * Early initcalls run before initializing SMP. | ||
| 174 | * | ||
| 175 | * Only for built-in code, not modules. | ||
| 176 | */ | ||
| 177 | #define early_initcall(fn) __define_initcall("early",fn,early) | ||
| 178 | |||
| 179 | /* | ||
| 173 | * A "pure" initcall has no dependencies on anything else, and purely | 180 | * A "pure" initcall has no dependencies on anything else, and purely |
| 174 | * initializes variables that couldn't be statically initialized. | 181 | * initializes variables that couldn't be statically initialized. |
| 175 | * | 182 | * |
| @@ -275,13 +282,7 @@ void __init parse_early_param(void); | |||
| 275 | 282 | ||
| 276 | #define security_initcall(fn) module_init(fn) | 283 | #define security_initcall(fn) module_init(fn) |
| 277 | 284 | ||
| 278 | /* These macros create a dummy inline: gcc 2.9x does not count alias | 285 | /* Each module must use one module_init(). */ |
| 279 | as usage, hence the `unused function' warning when __init functions | ||
| 280 | are declared static. We use the dummy __*_module_inline functions | ||
| 281 | both to kill the warning and check the type of the init/cleanup | ||
| 282 | function. */ | ||
| 283 | |||
| 284 | /* Each module must use one module_init(), or one no_module_init */ | ||
| 285 | #define module_init(initfn) \ | 286 | #define module_init(initfn) \ |
| 286 | static inline initcall_t __inittest(void) \ | 287 | static inline initcall_t __inittest(void) \ |
| 287 | { return initfn; } \ | 288 | { return initfn; } \ |
