diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-06-17 15:43:14 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-07-14 19:36:52 -0400 |
commit | 2066aadd53c563445039d6490b685783816270ec (patch) | |
tree | 72a69dee0008e429e62a80b8fad91faf1296737b /arch/sparc/kernel/smp_32.c | |
parent | 8bd26e3a7e49af2697449bbcb7187a39dc85d672 (diff) |
sparc: delete __cpuinit/__CPUINIT usage from all users
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.
Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.
This removes all the arch/sparc uses of the __cpuinit macros from
C files and removes __CPUINIT from assembly files. Note that even
though arch/sparc/kernel/trampoline_64.S has instances of ".previous"
in it, they are all paired off against explicit ".section" directives,
and not implicitly paired with __CPUINIT (unlike mips and arm were).
[1] https://lkml.org/lkml/2013/5/20/589
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'arch/sparc/kernel/smp_32.c')
-rw-r--r-- | arch/sparc/kernel/smp_32.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c index e3f2b81c23f1..a102bfba6ea8 100644 --- a/arch/sparc/kernel/smp_32.c +++ b/arch/sparc/kernel/smp_32.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include "kernel.h" | 39 | #include "kernel.h" |
40 | #include "irq.h" | 40 | #include "irq.h" |
41 | 41 | ||
42 | volatile unsigned long cpu_callin_map[NR_CPUS] __cpuinitdata = {0,}; | 42 | volatile unsigned long cpu_callin_map[NR_CPUS] = {0,}; |
43 | 43 | ||
44 | cpumask_t smp_commenced_mask = CPU_MASK_NONE; | 44 | cpumask_t smp_commenced_mask = CPU_MASK_NONE; |
45 | 45 | ||
@@ -53,7 +53,7 @@ const struct sparc32_ipi_ops *sparc32_ipi_ops; | |||
53 | * instruction which is much better... | 53 | * instruction which is much better... |
54 | */ | 54 | */ |
55 | 55 | ||
56 | void __cpuinit smp_store_cpu_info(int id) | 56 | void smp_store_cpu_info(int id) |
57 | { | 57 | { |
58 | int cpu_node; | 58 | int cpu_node; |
59 | int mid; | 59 | int mid; |
@@ -120,7 +120,7 @@ void cpu_panic(void) | |||
120 | panic("SMP bolixed\n"); | 120 | panic("SMP bolixed\n"); |
121 | } | 121 | } |
122 | 122 | ||
123 | struct linux_prom_registers smp_penguin_ctable __cpuinitdata = { 0 }; | 123 | struct linux_prom_registers smp_penguin_ctable = { 0 }; |
124 | 124 | ||
125 | void smp_send_reschedule(int cpu) | 125 | void smp_send_reschedule(int cpu) |
126 | { | 126 | { |
@@ -259,10 +259,10 @@ void __init smp_prepare_boot_cpu(void) | |||
259 | set_cpu_possible(cpuid, true); | 259 | set_cpu_possible(cpuid, true); |
260 | } | 260 | } |
261 | 261 | ||
262 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | 262 | int __cpu_up(unsigned int cpu, struct task_struct *tidle) |
263 | { | 263 | { |
264 | extern int __cpuinit smp4m_boot_one_cpu(int, struct task_struct *); | 264 | extern int smp4m_boot_one_cpu(int, struct task_struct *); |
265 | extern int __cpuinit smp4d_boot_one_cpu(int, struct task_struct *); | 265 | extern int smp4d_boot_one_cpu(int, struct task_struct *); |
266 | int ret=0; | 266 | int ret=0; |
267 | 267 | ||
268 | switch(sparc_cpu_model) { | 268 | switch(sparc_cpu_model) { |
@@ -297,7 +297,7 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
297 | return ret; | 297 | return ret; |
298 | } | 298 | } |
299 | 299 | ||
300 | void __cpuinit arch_cpu_pre_starting(void *arg) | 300 | void arch_cpu_pre_starting(void *arg) |
301 | { | 301 | { |
302 | local_ops->cache_all(); | 302 | local_ops->cache_all(); |
303 | local_ops->tlb_all(); | 303 | local_ops->tlb_all(); |
@@ -317,7 +317,7 @@ void __cpuinit arch_cpu_pre_starting(void *arg) | |||
317 | } | 317 | } |
318 | } | 318 | } |
319 | 319 | ||
320 | void __cpuinit arch_cpu_pre_online(void *arg) | 320 | void arch_cpu_pre_online(void *arg) |
321 | { | 321 | { |
322 | unsigned int cpuid = hard_smp_processor_id(); | 322 | unsigned int cpuid = hard_smp_processor_id(); |
323 | 323 | ||
@@ -344,7 +344,7 @@ void __cpuinit arch_cpu_pre_online(void *arg) | |||
344 | } | 344 | } |
345 | } | 345 | } |
346 | 346 | ||
347 | void __cpuinit sparc_start_secondary(void *arg) | 347 | void sparc_start_secondary(void *arg) |
348 | { | 348 | { |
349 | unsigned int cpu; | 349 | unsigned int cpu; |
350 | 350 | ||
@@ -375,7 +375,7 @@ void __cpuinit sparc_start_secondary(void *arg) | |||
375 | BUG(); | 375 | BUG(); |
376 | } | 376 | } |
377 | 377 | ||
378 | void __cpuinit smp_callin(void) | 378 | void smp_callin(void) |
379 | { | 379 | { |
380 | sparc_start_secondary(NULL); | 380 | sparc_start_secondary(NULL); |
381 | } | 381 | } |