aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq.c2
-rw-r--r--include/asm-generic/vmlinux.lds.h2
-rw-r--r--include/linux/init.h8
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 86e69b7f9122..dd0c2623e27b 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -59,7 +59,7 @@ static int __init init_cpufreq_transition_notifier_list(void)
59 srcu_init_notifier_head(&cpufreq_transition_notifier_list); 59 srcu_init_notifier_head(&cpufreq_transition_notifier_list);
60 return 0; 60 return 0;
61} 61}
62core_initcall(init_cpufreq_transition_notifier_list); 62pure_initcall(init_cpufreq_transition_notifier_list);
63 63
64static LIST_HEAD(cpufreq_governor_list); 64static LIST_HEAD(cpufreq_governor_list);
65static DEFINE_MUTEX (cpufreq_governor_mutex); 65static DEFINE_MUTEX (cpufreq_governor_mutex);
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 9d873163a7ab..e60d6f21fa62 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -215,6 +215,8 @@
215 .notes : { *(.note.*) } :note 215 .notes : { *(.note.*) } :note
216 216
217#define INITCALLS \ 217#define INITCALLS \
218 *(.initcall0.init) \
219 *(.initcall0s.init) \
218 *(.initcall1.init) \ 220 *(.initcall1.init) \
219 *(.initcall1s.init) \ 221 *(.initcall1s.init) \
220 *(.initcall2.init) \ 222 *(.initcall2.init) \
diff --git a/include/linux/init.h b/include/linux/init.h
index ff40ea118e3a..5eb5d24b7680 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -93,6 +93,14 @@ extern void setup_arch(char **);
93 static initcall_t __initcall_##fn##id __attribute_used__ \ 93 static initcall_t __initcall_##fn##id __attribute_used__ \
94 __attribute__((__section__(".initcall" level ".init"))) = fn 94 __attribute__((__section__(".initcall" level ".init"))) = fn
95 95
96/*
97 * A "pure" initcall has no dependencies on anything else, and purely
98 * initializes variables that couldn't be statically initialized.
99 *
100 * This only exists for built-in code, not for modules.
101 */
102#define pure_initcall(fn) __define_initcall("0",fn,1)
103
96#define core_initcall(fn) __define_initcall("1",fn,1) 104#define core_initcall(fn) __define_initcall("1",fn,1)
97#define core_initcall_sync(fn) __define_initcall("1s",fn,1s) 105#define core_initcall_sync(fn) __define_initcall("1s",fn,1s)
98#define postcore_initcall(fn) __define_initcall("2",fn,2) 106#define postcore_initcall(fn) __define_initcall("2",fn,2)