aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-06-18 16:56:21 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-07-14 19:36:53 -0400
commit13dff62d80e93f1cc65b4ad2dddedd12de720272 (patch)
tree51dd8b02bc07dd60da76907d11d2d9aef95ac3ba /arch/blackfin
parentb8c6453aaf142620c2e1a4c2da24bbb10cb424bf (diff)
blackfin: delete __cpuinit usage from all blackfin 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. 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/blackfin uses of the __cpuinit macros from all C files. Currently blackfin does not have any __CPUINIT used in assembly files. [1] https://lkml.org/lkml/2013/5/20/589 Cc: Mike Frysinger <vapier@gentoo.org> Cc: Bob Liu <lliubbo@gmail.com> Cc: Sonic Zhang <sonic.zhang@analog.com> Cc: uclinux-dist-devel@blackfin.uclinux.org Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/perf_event.c2
-rw-r--r--arch/blackfin/kernel/setup.c4
-rw-r--r--arch/blackfin/mach-bf561/smp.c6
-rw-r--r--arch/blackfin/mach-common/cache-c.c4
-rw-r--r--arch/blackfin/mach-common/ints-priority.c2
-rw-r--r--arch/blackfin/mach-common/smp.c12
6 files changed, 15 insertions, 15 deletions
diff --git a/arch/blackfin/kernel/perf_event.c b/arch/blackfin/kernel/perf_event.c
index e47d19ae3e06..974e55496db3 100644
--- a/arch/blackfin/kernel/perf_event.c
+++ b/arch/blackfin/kernel/perf_event.c
@@ -468,7 +468,7 @@ static void bfin_pmu_setup(int cpu)
468 memset(cpuhw, 0, sizeof(struct cpu_hw_events)); 468 memset(cpuhw, 0, sizeof(struct cpu_hw_events));
469} 469}
470 470
471static int __cpuinit 471static int
472bfin_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) 472bfin_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu)
473{ 473{
474 unsigned int cpu = (long)hcpu; 474 unsigned int cpu = (long)hcpu;
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 107b306b06f1..19ad0637e8ff 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -99,7 +99,7 @@ void __init generate_cplb_tables(void)
99} 99}
100#endif 100#endif
101 101
102void __cpuinit bfin_setup_caches(unsigned int cpu) 102void bfin_setup_caches(unsigned int cpu)
103{ 103{
104#ifdef CONFIG_BFIN_ICACHE 104#ifdef CONFIG_BFIN_ICACHE
105 bfin_icache_init(icplb_tbl[cpu]); 105 bfin_icache_init(icplb_tbl[cpu]);
@@ -165,7 +165,7 @@ void __cpuinit bfin_setup_caches(unsigned int cpu)
165#endif 165#endif
166} 166}
167 167
168void __cpuinit bfin_setup_cpudata(unsigned int cpu) 168void bfin_setup_cpudata(unsigned int cpu)
169{ 169{
170 struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); 170 struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu);
171 171
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index c77a23bc9de3..11789beca75a 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -48,7 +48,7 @@ int __init setup_profiling_timer(unsigned int multiplier) /* not supported */
48 return -EINVAL; 48 return -EINVAL;
49} 49}
50 50
51void __cpuinit platform_secondary_init(unsigned int cpu) 51void platform_secondary_init(unsigned int cpu)
52{ 52{
53 /* Clone setup for peripheral interrupt sources from CoreA. */ 53 /* Clone setup for peripheral interrupt sources from CoreA. */
54 bfin_write_SICB_IMASK0(bfin_read_SIC_IMASK0()); 54 bfin_write_SICB_IMASK0(bfin_read_SIC_IMASK0());
@@ -73,7 +73,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
73 spin_unlock(&boot_lock); 73 spin_unlock(&boot_lock);
74} 74}
75 75
76int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle) 76int platform_boot_secondary(unsigned int cpu, struct task_struct *idle)
77{ 77{
78 unsigned long timeout; 78 unsigned long timeout;
79 79
@@ -154,7 +154,7 @@ void platform_clear_ipi(unsigned int cpu, int irq)
154 * Setup core B's local core timer. 154 * Setup core B's local core timer.
155 * In SMP, core timer is used for clock event device. 155 * In SMP, core timer is used for clock event device.
156 */ 156 */
157void __cpuinit bfin_local_timer_setup(void) 157void bfin_local_timer_setup(void)
158{ 158{
159#if defined(CONFIG_TICKSOURCE_CORETMR) 159#if defined(CONFIG_TICKSOURCE_CORETMR)
160 struct irq_data *data = irq_get_irq_data(IRQ_CORETMR); 160 struct irq_data *data = irq_get_irq_data(IRQ_CORETMR);
diff --git a/arch/blackfin/mach-common/cache-c.c b/arch/blackfin/mach-common/cache-c.c
index a60a24f5035d..0e1e451fd7d8 100644
--- a/arch/blackfin/mach-common/cache-c.c
+++ b/arch/blackfin/mach-common/cache-c.c
@@ -52,7 +52,7 @@ bfin_cache_init(struct cplb_entry *cplb_tbl, unsigned long cplb_addr,
52} 52}
53 53
54#ifdef CONFIG_BFIN_ICACHE 54#ifdef CONFIG_BFIN_ICACHE
55void __cpuinit bfin_icache_init(struct cplb_entry *icplb_tbl) 55void bfin_icache_init(struct cplb_entry *icplb_tbl)
56{ 56{
57 bfin_cache_init(icplb_tbl, ICPLB_ADDR0, ICPLB_DATA0, IMEM_CONTROL, 57 bfin_cache_init(icplb_tbl, ICPLB_ADDR0, ICPLB_DATA0, IMEM_CONTROL,
58 (IMC | ENICPLB)); 58 (IMC | ENICPLB));
@@ -60,7 +60,7 @@ void __cpuinit bfin_icache_init(struct cplb_entry *icplb_tbl)
60#endif 60#endif
61 61
62#ifdef CONFIG_BFIN_DCACHE 62#ifdef CONFIG_BFIN_DCACHE
63void __cpuinit bfin_dcache_init(struct cplb_entry *dcplb_tbl) 63void bfin_dcache_init(struct cplb_entry *dcplb_tbl)
64{ 64{
65 /* 65 /*
66 * Anomaly notes: 66 * Anomaly notes:
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 6c0c6816a51a..d143fd8d2bc5 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -1281,7 +1281,7 @@ static struct irq_chip bfin_gpio_irqchip = {
1281 .irq_set_wake = bfin_gpio_set_wake, 1281 .irq_set_wake = bfin_gpio_set_wake,
1282}; 1282};
1283 1283
1284void __cpuinit init_exception_vectors(void) 1284void init_exception_vectors(void)
1285{ 1285{
1286 /* cannot program in software: 1286 /* cannot program in software:
1287 * evt0 - emulation (jtag) 1287 * evt0 - emulation (jtag)
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index 961d8392e5e3..e546db2f4bc8 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -46,7 +46,7 @@ struct corelock_slot corelock __attribute__ ((__section__(".l2.bss")));
46unsigned long blackfin_iflush_l1_entry[NR_CPUS]; 46unsigned long blackfin_iflush_l1_entry[NR_CPUS];
47#endif 47#endif
48 48
49struct blackfin_initial_pda __cpuinitdata initial_pda_coreb; 49struct blackfin_initial_pda initial_pda_coreb;
50 50
51enum ipi_message_type { 51enum ipi_message_type {
52 BFIN_IPI_NONE, 52 BFIN_IPI_NONE,
@@ -246,7 +246,7 @@ void smp_send_stop(void)
246 return; 246 return;
247} 247}
248 248
249int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) 249int __cpu_up(unsigned int cpu, struct task_struct *idle)
250{ 250{
251 int ret; 251 int ret;
252 252
@@ -259,7 +259,7 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
259 return ret; 259 return ret;
260} 260}
261 261
262static void __cpuinit setup_secondary(unsigned int cpu) 262static void setup_secondary(unsigned int cpu)
263{ 263{
264 unsigned long ilat; 264 unsigned long ilat;
265 265
@@ -277,7 +277,7 @@ static void __cpuinit setup_secondary(unsigned int cpu)
277 IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW; 277 IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
278} 278}
279 279
280void __cpuinit secondary_start_kernel(void) 280void secondary_start_kernel(void)
281{ 281{
282 unsigned int cpu = smp_processor_id(); 282 unsigned int cpu = smp_processor_id();
283 struct mm_struct *mm = &init_mm; 283 struct mm_struct *mm = &init_mm;
@@ -402,7 +402,7 @@ EXPORT_SYMBOL(resync_core_dcache);
402#endif 402#endif
403 403
404#ifdef CONFIG_HOTPLUG_CPU 404#ifdef CONFIG_HOTPLUG_CPU
405int __cpuexit __cpu_disable(void) 405int __cpu_disable(void)
406{ 406{
407 unsigned int cpu = smp_processor_id(); 407 unsigned int cpu = smp_processor_id();
408 408
@@ -415,7 +415,7 @@ int __cpuexit __cpu_disable(void)
415 415
416static DECLARE_COMPLETION(cpu_killed); 416static DECLARE_COMPLETION(cpu_killed);
417 417
418int __cpuexit __cpu_die(unsigned int cpu) 418int __cpu_die(unsigned int cpu)
419{ 419{
420 return wait_for_completion_timeout(&cpu_killed, 5000); 420 return wait_for_completion_timeout(&cpu_killed, 5000);
421} 421}