Skip to content

Commit 8c37bb3

Browse files
author
Paul Gortmaker
committed
clocksource+irqchip: delete __cpuinit usage from all related 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 5e427ec ("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 drivers/clocksource and drivers/irqchip uses of the __cpuinit macros from all C files. [1] https://lkml.org/lkml/2013/5/20/589 Cc: John Stultz <john.stultz@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
1 parent 148f9bb commit 8c37bb3

8 files changed

Lines changed: 24 additions & 24 deletions

File tree

‎drivers/clocksource/arm_arch_timer.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int arch_timer_set_next_event_phys(unsigned long evt,
123123
return 0;
124124
}
125125

126-
static int __cpuinit arch_timer_setup(struct clock_event_device *clk)
126+
static int arch_timer_setup(struct clock_event_device *clk)
127127
{
128128
clk->features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP;
129129
clk->name = "arch_sys_timer";
@@ -221,7 +221,7 @@ struct timecounter *arch_timer_get_timecounter(void)
221221
return &timecounter;
222222
}
223223

224-
static void __cpuinit arch_timer_stop(struct clock_event_device *clk)
224+
static void arch_timer_stop(struct clock_event_device *clk)
225225
{
226226
pr_debug("arch_timer_teardown disable IRQ%d cpu #%d\n",
227227
clk->irq, smp_processor_id());
@@ -237,7 +237,7 @@ static void __cpuinit arch_timer_stop(struct clock_event_device *clk)
237237
clk->set_mode(CLOCK_EVT_MODE_UNUSED, clk);
238238
}
239239

240-
static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
240+
static int arch_timer_cpu_notify(struct notifier_block *self,
241241
unsigned long action, void *hcpu)
242242
{
243243
/*
@@ -256,7 +256,7 @@ static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
256256
return NOTIFY_OK;
257257
}
258258

259-
static struct notifier_block arch_timer_cpu_nb __cpuinitdata = {
259+
static struct notifier_block arch_timer_cpu_nb = {
260260
.notifier_call = arch_timer_cpu_notify,
261261
};
262262

‎drivers/clocksource/arm_global_timer.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static irqreturn_t gt_clockevent_interrupt(int irq, void *dev_id)
164164
return IRQ_HANDLED;
165165
}
166166

167-
static int __cpuinit gt_clockevents_init(struct clock_event_device *clk)
167+
static int gt_clockevents_init(struct clock_event_device *clk)
168168
{
169169
int cpu = smp_processor_id();
170170

@@ -221,8 +221,8 @@ static void __init gt_clocksource_init(void)
221221
clocksource_register_hz(&gt_clocksource, gt_clk_rate);
222222
}
223223

224-
static int __cpuinit gt_cpu_notify(struct notifier_block *self,
225-
unsigned long action, void *hcpu)
224+
static int gt_cpu_notify(struct notifier_block *self, unsigned long action,
225+
void *hcpu)
226226
{
227227
switch (action & ~CPU_TASKS_FROZEN) {
228228
case CPU_STARTING:
@@ -235,7 +235,7 @@ static int __cpuinit gt_cpu_notify(struct notifier_block *self,
235235

236236
return NOTIFY_OK;
237237
}
238-
static struct notifier_block gt_cpu_nb __cpuinitdata = {
238+
static struct notifier_block gt_cpu_nb = {
239239
.notifier_call = gt_cpu_notify,
240240
};
241241

‎drivers/clocksource/dummy_timer.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static void dummy_timer_set_mode(enum clock_event_mode mode,
2525
*/
2626
}
2727

28-
static void __cpuinit dummy_timer_setup(void)
28+
static void dummy_timer_setup(void)
2929
{
3030
int cpu = smp_processor_id();
3131
struct clock_event_device *evt = __this_cpu_ptr(&dummy_timer_evt);
@@ -41,7 +41,7 @@ static void __cpuinit dummy_timer_setup(void)
4141
clockevents_register_device(evt);
4242
}
4343

44-
static int __cpuinit dummy_timer_cpu_notify(struct notifier_block *self,
44+
static int dummy_timer_cpu_notify(struct notifier_block *self,
4545
unsigned long action, void *hcpu)
4646
{
4747
if ((action & ~CPU_TASKS_FROZEN) == CPU_STARTING)
@@ -50,7 +50,7 @@ static int __cpuinit dummy_timer_cpu_notify(struct notifier_block *self,
5050
return NOTIFY_OK;
5151
}
5252

53-
static struct notifier_block dummy_timer_cpu_nb __cpuinitdata = {
53+
static struct notifier_block dummy_timer_cpu_nb = {
5454
.notifier_call = dummy_timer_cpu_notify,
5555
};
5656

‎drivers/clocksource/exynos_mct.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static irqreturn_t exynos4_mct_tick_isr(int irq, void *dev_id)
400400
return IRQ_HANDLED;
401401
}
402402

403-
static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt)
403+
static int exynos4_local_timer_setup(struct clock_event_device *evt)
404404
{
405405
struct mct_clock_event_device *mevt;
406406
unsigned int cpu = smp_processor_id();
@@ -448,7 +448,7 @@ static void exynos4_local_timer_stop(struct clock_event_device *evt)
448448
disable_percpu_irq(mct_irqs[MCT_L0_IRQ]);
449449
}
450450

451-
static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = {
451+
static struct local_timer_ops exynos4_mct_tick_ops = {
452452
.setup = exynos4_local_timer_setup,
453453
.stop = exynos4_local_timer_stop,
454454
};

‎drivers/clocksource/metag_generic.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ unsigned long long sched_clock(void)
109109
return ticks << HARDWARE_TO_NS_SHIFT;
110110
}
111111

112-
static void __cpuinit arch_timer_setup(unsigned int cpu)
112+
static void arch_timer_setup(unsigned int cpu)
113113
{
114114
unsigned int txdivtime;
115115
struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
@@ -154,7 +154,7 @@ static void __cpuinit arch_timer_setup(unsigned int cpu)
154154
}
155155
}
156156

157-
static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
157+
static int arch_timer_cpu_notify(struct notifier_block *self,
158158
unsigned long action, void *hcpu)
159159
{
160160
int cpu = (long)hcpu;
@@ -169,7 +169,7 @@ static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
169169
return NOTIFY_OK;
170170
}
171171

172-
static struct notifier_block __cpuinitdata arch_timer_cpu_nb = {
172+
static struct notifier_block arch_timer_cpu_nb = {
173173
.notifier_call = arch_timer_cpu_notify,
174174
};
175175

‎drivers/clocksource/time-armada-370-xp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static irqreturn_t armada_370_xp_timer_interrupt(int irq, void *dev_id)
167167
/*
168168
* Setup the local clock events for a CPU.
169169
*/
170-
static int __cpuinit armada_370_xp_timer_setup(struct clock_event_device *evt)
170+
static int armada_370_xp_timer_setup(struct clock_event_device *evt)
171171
{
172172
u32 u;
173173
int cpu = smp_processor_id();
@@ -205,7 +205,7 @@ static void armada_370_xp_timer_stop(struct clock_event_device *evt)
205205
disable_percpu_irq(evt->irq);
206206
}
207207

208-
static struct local_timer_ops armada_370_xp_local_timer_ops __cpuinitdata = {
208+
static struct local_timer_ops armada_370_xp_local_timer_ops = {
209209
.setup = armada_370_xp_timer_setup,
210210
.stop = armada_370_xp_timer_stop,
211211
};

‎drivers/clocksource/timer-marco.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static struct irqaction sirfsoc_timer1_irq = {
184184
.handler = sirfsoc_timer_interrupt,
185185
};
186186

187-
static int __cpuinit sirfsoc_local_timer_setup(struct clock_event_device *ce)
187+
static int sirfsoc_local_timer_setup(struct clock_event_device *ce)
188188
{
189189
/* Use existing clock_event for cpu 0 */
190190
if (!smp_processor_id())
@@ -216,7 +216,7 @@ static void sirfsoc_local_timer_stop(struct clock_event_device *ce)
216216
remove_irq(sirfsoc_timer1_irq.irq, &sirfsoc_timer1_irq);
217217
}
218218

219-
static struct local_timer_ops sirfsoc_local_timer_ops __cpuinitdata = {
219+
static struct local_timer_ops sirfsoc_local_timer_ops = {
220220
.setup = sirfsoc_local_timer_setup,
221221
.stop = sirfsoc_local_timer_stop,
222222
};

‎drivers/irqchip/irq-gic.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic)
414414
writel_relaxed(1, base + GIC_DIST_CTRL);
415415
}
416416

417-
static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
417+
static void gic_cpu_init(struct gic_chip_data *gic)
418418
{
419419
void __iomem *dist_base = gic_data_dist_base(gic);
420420
void __iomem *base = gic_data_cpu_base(gic);
@@ -702,8 +702,8 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
702702
}
703703

704704
#ifdef CONFIG_SMP
705-
static int __cpuinit gic_secondary_init(struct notifier_block *nfb,
706-
unsigned long action, void *hcpu)
705+
static int gic_secondary_init(struct notifier_block *nfb, unsigned long action,
706+
void *hcpu)
707707
{
708708
if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
709709
gic_cpu_init(&gic_data[0]);
@@ -714,7 +714,7 @@ static int __cpuinit gic_secondary_init(struct notifier_block *nfb,
714714
* Notifier for enabling the GIC CPU interface. Set an arbitrarily high
715715
* priority because the GIC needs to be up before the ARM generic timers.
716716
*/
717-
static struct notifier_block __cpuinitdata gic_cpu_notifier = {
717+
static struct notifier_block gic_cpu_notifier = {
718718
.notifier_call = gic_secondary_init,
719719
.priority = 100,
720720
};

0 commit comments

Comments
 (0)