aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-06-24 15:30:15 -0400
committerVineet Gupta <vgupta@synopsys.com>2013-06-27 05:07:58 -0400
commitce7599567e27eabc1003e35b6f05579268dafecd (patch)
tree1f3607404bbd8c09ffc0e2d309a3208565cc01d8 /arch
parentdc81df244028e0d07c8723e3f7ebd1a35e848293 (diff)
arc: delete __cpuinit usage from all arc 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/arc uses of the __cpuinit macros from all C files. Currently arc does not have any __CPUINIT used in assembly files. [1] https://lkml.org/lkml/2013/5/20/589 Cc: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/include/asm/irq.h2
-rw-r--r--arch/arc/kernel/irq.c2
-rw-r--r--arch/arc/kernel/setup.c10
-rw-r--r--arch/arc/kernel/smp.c4
-rw-r--r--arch/arc/kernel/time.c6
-rw-r--r--arch/arc/mm/cache_arc700.c4
-rw-r--r--arch/arc/mm/tlb.c4
7 files changed, 16 insertions, 16 deletions
diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h
index 57898a17eb82..c0a72105ee0b 100644
--- a/arch/arc/include/asm/irq.h
+++ b/arch/arc/include/asm/irq.h
@@ -21,6 +21,6 @@
21extern void __init arc_init_IRQ(void); 21extern void __init arc_init_IRQ(void);
22extern int __init get_hw_config_num_irq(void); 22extern int __init get_hw_config_num_irq(void);
23 23
24void __cpuinit arc_local_timer_setup(unsigned int cpu); 24void arc_local_timer_setup(unsigned int cpu);
25 25
26#endif 26#endif
diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c
index 4918a66a1d8e..305b3f866aa7 100644
--- a/arch/arc/kernel/irq.c
+++ b/arch/arc/kernel/irq.c
@@ -28,7 +28,7 @@
28 * -Disable all IRQs (on CPU side) 28 * -Disable all IRQs (on CPU side)
29 * -Optionally, setup the High priority Interrupts as Level 2 IRQs 29 * -Optionally, setup the High priority Interrupts as Level 2 IRQs
30 */ 30 */
31void __cpuinit arc_init_IRQ(void) 31void arc_init_IRQ(void)
32{ 32{
33 int level_mask = 0; 33 int level_mask = 0;
34 34
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index 5b6ee41113bf..6b083454d039 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -31,14 +31,14 @@
31int running_on_hw = 1; /* vs. on ISS */ 31int running_on_hw = 1; /* vs. on ISS */
32 32
33char __initdata command_line[COMMAND_LINE_SIZE]; 33char __initdata command_line[COMMAND_LINE_SIZE];
34struct machine_desc *machine_desc __cpuinitdata; 34struct machine_desc *machine_desc;
35 35
36struct task_struct *_current_task[NR_CPUS]; /* For stack switching */ 36struct task_struct *_current_task[NR_CPUS]; /* For stack switching */
37 37
38struct cpuinfo_arc cpuinfo_arc700[NR_CPUS]; 38struct cpuinfo_arc cpuinfo_arc700[NR_CPUS];
39 39
40 40
41void __cpuinit read_arc_build_cfg_regs(void) 41void read_arc_build_cfg_regs(void)
42{ 42{
43 struct bcr_perip uncached_space; 43 struct bcr_perip uncached_space;
44 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; 44 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
@@ -237,7 +237,7 @@ char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
237 return buf; 237 return buf;
238} 238}
239 239
240void __cpuinit arc_chk_ccms(void) 240void arc_chk_ccms(void)
241{ 241{
242#if defined(CONFIG_ARC_HAS_DCCM) || defined(CONFIG_ARC_HAS_ICCM) 242#if defined(CONFIG_ARC_HAS_DCCM) || defined(CONFIG_ARC_HAS_ICCM)
243 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; 243 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
@@ -272,7 +272,7 @@ void __cpuinit arc_chk_ccms(void)
272 * hardware has dedicated regs which need to be saved/restored on ctx-sw 272 * hardware has dedicated regs which need to be saved/restored on ctx-sw
273 * (Single Precision uses core regs), thus kernel is kind of oblivious to it 273 * (Single Precision uses core regs), thus kernel is kind of oblivious to it
274 */ 274 */
275void __cpuinit arc_chk_fpu(void) 275void arc_chk_fpu(void)
276{ 276{
277 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; 277 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
278 278
@@ -293,7 +293,7 @@ void __cpuinit arc_chk_fpu(void)
293 * such as only for boot CPU etc 293 * such as only for boot CPU etc
294 */ 294 */
295 295
296void __cpuinit setup_processor(void) 296void setup_processor(void)
297{ 297{
298 char str[512]; 298 char str[512];
299 int cpu_id = smp_processor_id(); 299 int cpu_id = smp_processor_id();
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
index 5c7fd603d216..bca3052c956d 100644
--- a/arch/arc/kernel/smp.c
+++ b/arch/arc/kernel/smp.c
@@ -117,7 +117,7 @@ const char *arc_platform_smp_cpuinfo(void)
117 * Called from asm stub in head.S 117 * Called from asm stub in head.S
118 * "current"/R25 already setup by low level boot code 118 * "current"/R25 already setup by low level boot code
119 */ 119 */
120void __cpuinit start_kernel_secondary(void) 120void start_kernel_secondary(void)
121{ 121{
122 struct mm_struct *mm = &init_mm; 122 struct mm_struct *mm = &init_mm;
123 unsigned int cpu = smp_processor_id(); 123 unsigned int cpu = smp_processor_id();
@@ -154,7 +154,7 @@ void __cpuinit start_kernel_secondary(void)
154 * 154 *
155 * Essential requirements being where to run from (PC) and stack (SP) 155 * Essential requirements being where to run from (PC) and stack (SP)
156*/ 156*/
157int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) 157int __cpu_up(unsigned int cpu, struct task_struct *idle)
158{ 158{
159 unsigned long wait_till; 159 unsigned long wait_till;
160 160
diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c
index 32afa54a585d..0e51e69cf30d 100644
--- a/arch/arc/kernel/time.c
+++ b/arch/arc/kernel/time.c
@@ -61,7 +61,7 @@
61 61
62#ifdef CONFIG_ARC_HAS_RTSC 62#ifdef CONFIG_ARC_HAS_RTSC
63 63
64int __cpuinit arc_counter_setup(void) 64int arc_counter_setup(void)
65{ 65{
66 /* RTSC insn taps into cpu clk, needs no setup */ 66 /* RTSC insn taps into cpu clk, needs no setup */
67 67
@@ -116,7 +116,7 @@ static bool is_usable_as_clocksource(void)
116/* 116/*
117 * set 32bit TIMER1 to keep counting monotonically and wraparound 117 * set 32bit TIMER1 to keep counting monotonically and wraparound
118 */ 118 */
119int __cpuinit arc_counter_setup(void) 119int arc_counter_setup(void)
120{ 120{
121 write_aux_reg(ARC_REG_TIMER1_LIMIT, ARC_TIMER_MAX); 121 write_aux_reg(ARC_REG_TIMER1_LIMIT, ARC_TIMER_MAX);
122 write_aux_reg(ARC_REG_TIMER1_CNT, 0); 122 write_aux_reg(ARC_REG_TIMER1_CNT, 0);
@@ -223,7 +223,7 @@ static struct irqaction arc_timer_irq = {
223 * Setup the local event timer for @cpu 223 * Setup the local event timer for @cpu
224 * N.B. weak so that some exotic ARC SoCs can completely override it 224 * N.B. weak so that some exotic ARC SoCs can completely override it
225 */ 225 */
226void __attribute__((weak)) __cpuinit arc_local_timer_setup(unsigned int cpu) 226void __attribute__((weak)) arc_local_timer_setup(unsigned int cpu)
227{ 227{
228 struct clock_event_device *clk = &per_cpu(arc_clockevent_device, cpu); 228 struct clock_event_device *clk = &per_cpu(arc_clockevent_device, cpu);
229 229
diff --git a/arch/arc/mm/cache_arc700.c b/arch/arc/mm/cache_arc700.c
index 66c75ee16e50..f415d851b765 100644
--- a/arch/arc/mm/cache_arc700.c
+++ b/arch/arc/mm/cache_arc700.c
@@ -129,7 +129,7 @@ char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len)
129 * the cpuinfo structure for later use. 129 * the cpuinfo structure for later use.
130 * No Validation done here, simply read/convert the BCRs 130 * No Validation done here, simply read/convert the BCRs
131 */ 131 */
132void __cpuinit read_decode_cache_bcr(void) 132void read_decode_cache_bcr(void)
133{ 133{
134 struct cpuinfo_arc_cache *p_ic, *p_dc; 134 struct cpuinfo_arc_cache *p_ic, *p_dc;
135 unsigned int cpu = smp_processor_id(); 135 unsigned int cpu = smp_processor_id();
@@ -167,7 +167,7 @@ void __cpuinit read_decode_cache_bcr(void)
167 * 3. Enable the Caches, setup default flush mode for D-Cache 167 * 3. Enable the Caches, setup default flush mode for D-Cache
168 * 3. Calculate the SHMLBA used by user space 168 * 3. Calculate the SHMLBA used by user space
169 */ 169 */
170void __cpuinit arc_cache_init(void) 170void arc_cache_init(void)
171{ 171{
172 unsigned int cpu = smp_processor_id(); 172 unsigned int cpu = smp_processor_id();
173 struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache; 173 struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache;
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c
index d44ae33c2d1e..7957dc4e4d4a 100644
--- a/arch/arc/mm/tlb.c
+++ b/arch/arc/mm/tlb.c
@@ -469,7 +469,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
469 * the cpuinfo structure for later use. 469 * the cpuinfo structure for later use.
470 * No Validation is done here, simply read/convert the BCRs 470 * No Validation is done here, simply read/convert the BCRs
471 */ 471 */
472void __cpuinit read_decode_mmu_bcr(void) 472void read_decode_mmu_bcr(void)
473{ 473{
474 struct cpuinfo_arc_mmu *mmu = &cpuinfo_arc700[smp_processor_id()].mmu; 474 struct cpuinfo_arc_mmu *mmu = &cpuinfo_arc700[smp_processor_id()].mmu;
475 unsigned int tmp; 475 unsigned int tmp;
@@ -530,7 +530,7 @@ char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len)
530 return buf; 530 return buf;
531} 531}
532 532
533void __cpuinit arc_mmu_init(void) 533void arc_mmu_init(void)
534{ 534{
535 char str[256]; 535 char str[256];
536 struct cpuinfo_arc_mmu *mmu = &cpuinfo_arc700[smp_processor_id()].mmu; 536 struct cpuinfo_arc_mmu *mmu = &cpuinfo_arc700[smp_processor_id()].mmu;