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:51 -0400 |
commit | 60ffef065dd40b91f6f76af6c7510ddf23102f54 (patch) | |
tree | 72e183efcf4a43c6351d6cc944011b1e77ba6113 | |
parent | ab39c77c3246f8462663fb1b07fa193f3e31e255 (diff) |
parisc: delete __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.
This removes all the parisc uses of the __cpuinit macros.
[1] https://lkml.org/lkml/2013/5/20/589
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | arch/parisc/kernel/firmware.c | 14 | ||||
-rw-r--r-- | arch/parisc/kernel/hardware.c | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/processor.c | 6 | ||||
-rw-r--r-- | arch/parisc/kernel/smp.c | 8 |
4 files changed, 16 insertions, 14 deletions
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index f65fa480c905..22395901d47b 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
@@ -150,7 +150,7 @@ static void convert_to_wide(unsigned long *addr) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | #ifdef CONFIG_64BIT | 152 | #ifdef CONFIG_64BIT |
153 | void __cpuinit set_firmware_width_unlocked(void) | 153 | void set_firmware_width_unlocked(void) |
154 | { | 154 | { |
155 | int ret; | 155 | int ret; |
156 | 156 | ||
@@ -167,7 +167,7 @@ void __cpuinit set_firmware_width_unlocked(void) | |||
167 | * This function must be called before any pdc_* function that uses the | 167 | * This function must be called before any pdc_* function that uses the |
168 | * convert_to_wide function. | 168 | * convert_to_wide function. |
169 | */ | 169 | */ |
170 | void __cpuinit set_firmware_width(void) | 170 | void set_firmware_width(void) |
171 | { | 171 | { |
172 | unsigned long flags; | 172 | unsigned long flags; |
173 | spin_lock_irqsave(&pdc_lock, flags); | 173 | spin_lock_irqsave(&pdc_lock, flags); |
@@ -175,11 +175,13 @@ void __cpuinit set_firmware_width(void) | |||
175 | spin_unlock_irqrestore(&pdc_lock, flags); | 175 | spin_unlock_irqrestore(&pdc_lock, flags); |
176 | } | 176 | } |
177 | #else | 177 | #else |
178 | void __cpuinit set_firmware_width_unlocked(void) { | 178 | void set_firmware_width_unlocked(void) |
179 | { | ||
179 | return; | 180 | return; |
180 | } | 181 | } |
181 | 182 | ||
182 | void __cpuinit set_firmware_width(void) { | 183 | void set_firmware_width(void) |
184 | { | ||
183 | return; | 185 | return; |
184 | } | 186 | } |
185 | #endif /*CONFIG_64BIT*/ | 187 | #endif /*CONFIG_64BIT*/ |
@@ -301,7 +303,7 @@ int pdc_chassis_warn(unsigned long *warn) | |||
301 | return retval; | 303 | return retval; |
302 | } | 304 | } |
303 | 305 | ||
304 | int __cpuinit pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info) | 306 | int pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info) |
305 | { | 307 | { |
306 | int ret; | 308 | int ret; |
307 | 309 | ||
@@ -322,7 +324,7 @@ int __cpuinit pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info) | |||
322 | * This PDC call returns the presence and status of all the coprocessors | 324 | * This PDC call returns the presence and status of all the coprocessors |
323 | * attached to the processor. | 325 | * attached to the processor. |
324 | */ | 326 | */ |
325 | int __cpuinit pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info) | 327 | int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info) |
326 | { | 328 | { |
327 | int ret; | 329 | int ret; |
328 | unsigned long flags; | 330 | unsigned long flags; |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 872275659d98..06cb3992907e 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
@@ -1367,7 +1367,7 @@ const char *parisc_hardware_description(struct parisc_device_id *id) | |||
1367 | 1367 | ||
1368 | 1368 | ||
1369 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ | 1369 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ |
1370 | enum cpu_type __cpuinit | 1370 | enum cpu_type |
1371 | parisc_get_cpu_type(unsigned long hversion) | 1371 | parisc_get_cpu_type(unsigned long hversion) |
1372 | { | 1372 | { |
1373 | struct hp_cpu_type_mask *ptr; | 1373 | struct hp_cpu_type_mask *ptr; |
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 8a96c8ab9fe6..b68d977ce30f 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c | |||
@@ -73,7 +73,7 @@ extern int update_cr16_clocksource(void); /* from time.c */ | |||
73 | * | 73 | * |
74 | * FIXME: doesn't do much yet... | 74 | * FIXME: doesn't do much yet... |
75 | */ | 75 | */ |
76 | static void __cpuinit | 76 | static void |
77 | init_percpu_prof(unsigned long cpunum) | 77 | init_percpu_prof(unsigned long cpunum) |
78 | { | 78 | { |
79 | struct cpuinfo_parisc *p; | 79 | struct cpuinfo_parisc *p; |
@@ -92,7 +92,7 @@ init_percpu_prof(unsigned long cpunum) | |||
92 | * (return 1). If so, initialize the chip and tell other partners in crime | 92 | * (return 1). If so, initialize the chip and tell other partners in crime |
93 | * they have work to do. | 93 | * they have work to do. |
94 | */ | 94 | */ |
95 | static int __cpuinit processor_probe(struct parisc_device *dev) | 95 | static int processor_probe(struct parisc_device *dev) |
96 | { | 96 | { |
97 | unsigned long txn_addr; | 97 | unsigned long txn_addr; |
98 | unsigned long cpuid; | 98 | unsigned long cpuid; |
@@ -299,7 +299,7 @@ void __init collect_boot_cpu_data(void) | |||
299 | * | 299 | * |
300 | * o Enable CPU profiling hooks. | 300 | * o Enable CPU profiling hooks. |
301 | */ | 301 | */ |
302 | int __cpuinit init_per_cpu(int cpunum) | 302 | int init_per_cpu(int cpunum) |
303 | { | 303 | { |
304 | int ret; | 304 | int ret; |
305 | struct pdc_coproc_cfg coproc_cfg; | 305 | struct pdc_coproc_cfg coproc_cfg; |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index e3614fb343e5..8a252f2d6c08 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -62,9 +62,9 @@ static int smp_debug_lvl = 0; | |||
62 | volatile struct task_struct *smp_init_current_idle_task; | 62 | volatile struct task_struct *smp_init_current_idle_task; |
63 | 63 | ||
64 | /* track which CPU is booting */ | 64 | /* track which CPU is booting */ |
65 | static volatile int cpu_now_booting __cpuinitdata; | 65 | static volatile int cpu_now_booting; |
66 | 66 | ||
67 | static int parisc_max_cpus __cpuinitdata = 1; | 67 | static int parisc_max_cpus = 1; |
68 | 68 | ||
69 | static DEFINE_PER_CPU(spinlock_t, ipi_lock); | 69 | static DEFINE_PER_CPU(spinlock_t, ipi_lock); |
70 | 70 | ||
@@ -328,7 +328,7 @@ void __init smp_callin(void) | |||
328 | /* | 328 | /* |
329 | * Bring one cpu online. | 329 | * Bring one cpu online. |
330 | */ | 330 | */ |
331 | int __cpuinit smp_boot_one_cpu(int cpuid, struct task_struct *idle) | 331 | int smp_boot_one_cpu(int cpuid, struct task_struct *idle) |
332 | { | 332 | { |
333 | const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); | 333 | const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); |
334 | long timeout; | 334 | long timeout; |
@@ -424,7 +424,7 @@ void smp_cpus_done(unsigned int cpu_max) | |||
424 | } | 424 | } |
425 | 425 | ||
426 | 426 | ||
427 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | 427 | int __cpu_up(unsigned int cpu, struct task_struct *tidle) |
428 | { | 428 | { |
429 | if (cpu != 0 && cpu < parisc_max_cpus) | 429 | if (cpu != 0 && cpu < parisc_max_cpus) |
430 | smp_boot_one_cpu(cpu, tidle); | 430 | smp_boot_one_cpu(cpu, tidle); |