diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-06-19 14:53:51 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-07-14 19:36:59 -0400 |
commit | 0db0628d90125193280eabb501c94feaf48fa9ab (patch) | |
tree | 0e0ef0c4eac101d25a3bd125c4a9200ac4d294c0 /kernel/sched/core.c | |
parent | 49fb4c6290c70c418a5c25eee996d6b55ea132d6 (diff) |
kernel: delete __cpuinit usage from all core kernel files
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.
After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.
This removes all the uses of the __cpuinit macros from C files in
the core kernel directories (kernel, init, lib, mm, and include)
that don't really have a specific maintainer.
[1] https://lkml.org/lkml/2013/5/20/589
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 0d8eb4525e76..b7c32cb7bfeb 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -4133,7 +4133,7 @@ void show_state_filter(unsigned long state_filter) | |||
4133 | debug_show_all_locks(); | 4133 | debug_show_all_locks(); |
4134 | } | 4134 | } |
4135 | 4135 | ||
4136 | void __cpuinit init_idle_bootup_task(struct task_struct *idle) | 4136 | void init_idle_bootup_task(struct task_struct *idle) |
4137 | { | 4137 | { |
4138 | idle->sched_class = &idle_sched_class; | 4138 | idle->sched_class = &idle_sched_class; |
4139 | } | 4139 | } |
@@ -4146,7 +4146,7 @@ void __cpuinit init_idle_bootup_task(struct task_struct *idle) | |||
4146 | * NOTE: this function does not set the idle thread's NEED_RESCHED | 4146 | * NOTE: this function does not set the idle thread's NEED_RESCHED |
4147 | * flag, to make booting more robust. | 4147 | * flag, to make booting more robust. |
4148 | */ | 4148 | */ |
4149 | void __cpuinit init_idle(struct task_struct *idle, int cpu) | 4149 | void init_idle(struct task_struct *idle, int cpu) |
4150 | { | 4150 | { |
4151 | struct rq *rq = cpu_rq(cpu); | 4151 | struct rq *rq = cpu_rq(cpu); |
4152 | unsigned long flags; | 4152 | unsigned long flags; |
@@ -4630,7 +4630,7 @@ static void set_rq_offline(struct rq *rq) | |||
4630 | * migration_call - callback that gets triggered when a CPU is added. | 4630 | * migration_call - callback that gets triggered when a CPU is added. |
4631 | * Here we can start up the necessary migration thread for the new CPU. | 4631 | * Here we can start up the necessary migration thread for the new CPU. |
4632 | */ | 4632 | */ |
4633 | static int __cpuinit | 4633 | static int |
4634 | migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | 4634 | migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) |
4635 | { | 4635 | { |
4636 | int cpu = (long)hcpu; | 4636 | int cpu = (long)hcpu; |
@@ -4684,12 +4684,12 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
4684 | * happens before everything else. This has to be lower priority than | 4684 | * happens before everything else. This has to be lower priority than |
4685 | * the notifier in the perf_event subsystem, though. | 4685 | * the notifier in the perf_event subsystem, though. |
4686 | */ | 4686 | */ |
4687 | static struct notifier_block __cpuinitdata migration_notifier = { | 4687 | static struct notifier_block migration_notifier = { |
4688 | .notifier_call = migration_call, | 4688 | .notifier_call = migration_call, |
4689 | .priority = CPU_PRI_MIGRATION, | 4689 | .priority = CPU_PRI_MIGRATION, |
4690 | }; | 4690 | }; |
4691 | 4691 | ||
4692 | static int __cpuinit sched_cpu_active(struct notifier_block *nfb, | 4692 | static int sched_cpu_active(struct notifier_block *nfb, |
4693 | unsigned long action, void *hcpu) | 4693 | unsigned long action, void *hcpu) |
4694 | { | 4694 | { |
4695 | switch (action & ~CPU_TASKS_FROZEN) { | 4695 | switch (action & ~CPU_TASKS_FROZEN) { |
@@ -4702,7 +4702,7 @@ static int __cpuinit sched_cpu_active(struct notifier_block *nfb, | |||
4702 | } | 4702 | } |
4703 | } | 4703 | } |
4704 | 4704 | ||
4705 | static int __cpuinit sched_cpu_inactive(struct notifier_block *nfb, | 4705 | static int sched_cpu_inactive(struct notifier_block *nfb, |
4706 | unsigned long action, void *hcpu) | 4706 | unsigned long action, void *hcpu) |
4707 | { | 4707 | { |
4708 | switch (action & ~CPU_TASKS_FROZEN) { | 4708 | switch (action & ~CPU_TASKS_FROZEN) { |