diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-06-18 09:38:59 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-07-14 19:36:51 -0400 |
commit | 078a55fc824c1633b3a507e4ad48b4637c1dfc18 (patch) | |
tree | b7abb8d50bf6e322baaea322e9224d7715b52f5b /arch/mips/sibyte | |
parent | 60ffef065dd40b91f6f76af6c7510ddf23102f54 (diff) |
MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code
commit 3747069b25e419f6b51395f48127e9812abc3596 upstream.
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)
and are flagged as __cpuinit -- so if we remove the __cpuinit from
the arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
related content into no-ops as early as possible, since that will get
rid of these warnings. In any case, they are temporary and harmless.
Here, we remove all the MIPS __cpuinit from C code and __CPUINIT
from asm files. MIPS is interesting in this respect, because there
are also uasm users hiding behind their own renamed versions of the
__cpuinit macros.
[1] https://lkml.org/lkml/2013/5/20/589
[ralf@linux-mips.org: Folded in Paul's followup fix.]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5494/
Patchwork: https://patchwork.linux-mips.org/patch/5495/
Patchwork: https://patchwork.linux-mips.org/patch/5509/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sibyte')
-rw-r--r-- | arch/mips/sibyte/bcm1480/smp.c | 8 | ||||
-rw-r--r-- | arch/mips/sibyte/sb1250/smp.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c index de88e22694a0..54e2c4de15c1 100644 --- a/arch/mips/sibyte/bcm1480/smp.c +++ b/arch/mips/sibyte/bcm1480/smp.c | |||
@@ -60,7 +60,7 @@ static void *mailbox_0_regs[] = { | |||
60 | /* | 60 | /* |
61 | * SMP init and finish on secondary CPUs | 61 | * SMP init and finish on secondary CPUs |
62 | */ | 62 | */ |
63 | void __cpuinit bcm1480_smp_init(void) | 63 | void bcm1480_smp_init(void) |
64 | { | 64 | { |
65 | unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 | | 65 | unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 | |
66 | STATUSF_IP1 | STATUSF_IP0; | 66 | STATUSF_IP1 | STATUSF_IP0; |
@@ -95,7 +95,7 @@ static void bcm1480_send_ipi_mask(const struct cpumask *mask, | |||
95 | /* | 95 | /* |
96 | * Code to run on secondary just after probing the CPU | 96 | * Code to run on secondary just after probing the CPU |
97 | */ | 97 | */ |
98 | static void __cpuinit bcm1480_init_secondary(void) | 98 | static void bcm1480_init_secondary(void) |
99 | { | 99 | { |
100 | extern void bcm1480_smp_init(void); | 100 | extern void bcm1480_smp_init(void); |
101 | 101 | ||
@@ -106,7 +106,7 @@ static void __cpuinit bcm1480_init_secondary(void) | |||
106 | * Do any tidying up before marking online and running the idle | 106 | * Do any tidying up before marking online and running the idle |
107 | * loop | 107 | * loop |
108 | */ | 108 | */ |
109 | static void __cpuinit bcm1480_smp_finish(void) | 109 | static void bcm1480_smp_finish(void) |
110 | { | 110 | { |
111 | extern void sb1480_clockevent_init(void); | 111 | extern void sb1480_clockevent_init(void); |
112 | 112 | ||
@@ -125,7 +125,7 @@ static void bcm1480_cpus_done(void) | |||
125 | * Setup the PC, SP, and GP of a secondary processor and start it | 125 | * Setup the PC, SP, and GP of a secondary processor and start it |
126 | * running! | 126 | * running! |
127 | */ | 127 | */ |
128 | static void __cpuinit bcm1480_boot_secondary(int cpu, struct task_struct *idle) | 128 | static void bcm1480_boot_secondary(int cpu, struct task_struct *idle) |
129 | { | 129 | { |
130 | int retval; | 130 | int retval; |
131 | 131 | ||
diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c index 285cfef4ebc0..d7b942db0ea5 100644 --- a/arch/mips/sibyte/sb1250/smp.c +++ b/arch/mips/sibyte/sb1250/smp.c | |||
@@ -48,7 +48,7 @@ static void *mailbox_regs[] = { | |||
48 | /* | 48 | /* |
49 | * SMP init and finish on secondary CPUs | 49 | * SMP init and finish on secondary CPUs |
50 | */ | 50 | */ |
51 | void __cpuinit sb1250_smp_init(void) | 51 | void sb1250_smp_init(void) |
52 | { | 52 | { |
53 | unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 | | 53 | unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 | |
54 | STATUSF_IP1 | STATUSF_IP0; | 54 | STATUSF_IP1 | STATUSF_IP0; |
@@ -83,7 +83,7 @@ static inline void sb1250_send_ipi_mask(const struct cpumask *mask, | |||
83 | /* | 83 | /* |
84 | * Code to run on secondary just after probing the CPU | 84 | * Code to run on secondary just after probing the CPU |
85 | */ | 85 | */ |
86 | static void __cpuinit sb1250_init_secondary(void) | 86 | static void sb1250_init_secondary(void) |
87 | { | 87 | { |
88 | extern void sb1250_smp_init(void); | 88 | extern void sb1250_smp_init(void); |
89 | 89 | ||
@@ -94,7 +94,7 @@ static void __cpuinit sb1250_init_secondary(void) | |||
94 | * Do any tidying up before marking online and running the idle | 94 | * Do any tidying up before marking online and running the idle |
95 | * loop | 95 | * loop |
96 | */ | 96 | */ |
97 | static void __cpuinit sb1250_smp_finish(void) | 97 | static void sb1250_smp_finish(void) |
98 | { | 98 | { |
99 | extern void sb1250_clockevent_init(void); | 99 | extern void sb1250_clockevent_init(void); |
100 | 100 | ||
@@ -113,7 +113,7 @@ static void sb1250_cpus_done(void) | |||
113 | * Setup the PC, SP, and GP of a secondary processor and start it | 113 | * Setup the PC, SP, and GP of a secondary processor and start it |
114 | * running! | 114 | * running! |
115 | */ | 115 | */ |
116 | static void __cpuinit sb1250_boot_secondary(int cpu, struct task_struct *idle) | 116 | static void sb1250_boot_secondary(int cpu, struct task_struct *idle) |
117 | { | 117 | { |
118 | int retval; | 118 | int retval; |
119 | 119 | ||