]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
clocksource+irqchip: delete __cpuinit usage from all related files
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 19 Jun 2013 15:32:08 +0000 (11:32 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 14 Jul 2013 23:36:57 +0000 (19:36 -0400)
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 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>
drivers/clocksource/arm_arch_timer.c
drivers/clocksource/arm_global_timer.c
drivers/clocksource/dummy_timer.c
drivers/clocksource/exynos_mct.c
drivers/clocksource/metag_generic.c
drivers/clocksource/time-armada-370-xp.c
drivers/clocksource/timer-marco.c
drivers/irqchip/irq-gic.c

index 053d846ab5b108931ccbeacb67ebc7c85696d0f6..ffadd836e0b5173a96d30f20b2f16faeda823c57 100644 (file)
@@ -123,7 +123,7 @@ static int arch_timer_set_next_event_phys(unsigned long evt,
        return 0;
 }
 
-static int __cpuinit arch_timer_setup(struct clock_event_device *clk)
+static int arch_timer_setup(struct clock_event_device *clk)
 {
        clk->features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP;
        clk->name = "arch_sys_timer";
@@ -221,7 +221,7 @@ struct timecounter *arch_timer_get_timecounter(void)
        return &timecounter;
 }
 
-static void __cpuinit arch_timer_stop(struct clock_event_device *clk)
+static void arch_timer_stop(struct clock_event_device *clk)
 {
        pr_debug("arch_timer_teardown disable IRQ%d cpu #%d\n",
                 clk->irq, smp_processor_id());
@@ -237,7 +237,7 @@ static void __cpuinit arch_timer_stop(struct clock_event_device *clk)
        clk->set_mode(CLOCK_EVT_MODE_UNUSED, clk);
 }
 
-static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
+static int arch_timer_cpu_notify(struct notifier_block *self,
                                           unsigned long action, void *hcpu)
 {
        /*
@@ -256,7 +256,7 @@ static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
 }
 
-static struct notifier_block arch_timer_cpu_nb __cpuinitdata = {
+static struct notifier_block arch_timer_cpu_nb = {
        .notifier_call = arch_timer_cpu_notify,
 };
 
index db8afc7427a6b6a3c9548b9dd60d4ba2d1dbc54e..b66c1f36066ced2f7bc8ae68677397fddfb3f4f0 100644 (file)
@@ -164,7 +164,7 @@ static irqreturn_t gt_clockevent_interrupt(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static int __cpuinit gt_clockevents_init(struct clock_event_device *clk)
+static int gt_clockevents_init(struct clock_event_device *clk)
 {
        int cpu = smp_processor_id();
 
@@ -221,8 +221,8 @@ static void __init gt_clocksource_init(void)
        clocksource_register_hz(&gt_clocksource, gt_clk_rate);
 }
 
-static int __cpuinit gt_cpu_notify(struct notifier_block *self,
-                                          unsigned long action, void *hcpu)
+static int gt_cpu_notify(struct notifier_block *self, unsigned long action,
+                        void *hcpu)
 {
        switch (action & ~CPU_TASKS_FROZEN) {
        case CPU_STARTING:
@@ -235,7 +235,7 @@ static int __cpuinit gt_cpu_notify(struct notifier_block *self,
 
        return NOTIFY_OK;
 }
-static struct notifier_block gt_cpu_nb __cpuinitdata = {
+static struct notifier_block gt_cpu_nb = {
        .notifier_call = gt_cpu_notify,
 };
 
index 1f55f96203381bd361197bd954ddaafa399b3acb..b3eb582d6a6f1956bc870067188bb03a090fd30b 100644 (file)
@@ -25,7 +25,7 @@ static void dummy_timer_set_mode(enum clock_event_mode mode,
         */
 }
 
-static void __cpuinit dummy_timer_setup(void)
+static void dummy_timer_setup(void)
 {
        int cpu = smp_processor_id();
        struct clock_event_device *evt = __this_cpu_ptr(&dummy_timer_evt);
@@ -41,7 +41,7 @@ static void __cpuinit dummy_timer_setup(void)
        clockevents_register_device(evt);
 }
 
-static int __cpuinit dummy_timer_cpu_notify(struct notifier_block *self,
+static int dummy_timer_cpu_notify(struct notifier_block *self,
                                      unsigned long action, void *hcpu)
 {
        if ((action & ~CPU_TASKS_FROZEN) == CPU_STARTING)
@@ -50,7 +50,7 @@ static int __cpuinit dummy_timer_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
 }
 
-static struct notifier_block dummy_timer_cpu_nb __cpuinitdata = {
+static struct notifier_block dummy_timer_cpu_nb = {
        .notifier_call = dummy_timer_cpu_notify,
 };
 
index a70480409ea526a9233e9af6025c50ade2497167..b2bbc415f12055886a53288d1cca2d11a91a304c 100644 (file)
@@ -400,7 +400,7 @@ static irqreturn_t exynos4_mct_tick_isr(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt)
+static int exynos4_local_timer_setup(struct clock_event_device *evt)
 {
        struct mct_clock_event_device *mevt;
        unsigned int cpu = smp_processor_id();
@@ -448,7 +448,7 @@ static void exynos4_local_timer_stop(struct clock_event_device *evt)
                disable_percpu_irq(mct_irqs[MCT_L0_IRQ]);
 }
 
-static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = {
+static struct local_timer_ops exynos4_mct_tick_ops = {
        .setup  = exynos4_local_timer_setup,
        .stop   = exynos4_local_timer_stop,
 };
index 6722f0e2fe40bc9f4767928905df04c737b549fe..9e4db41abe3ccc0a84b350e159f7fa2ed6b001b2 100644 (file)
@@ -109,7 +109,7 @@ unsigned long long sched_clock(void)
        return ticks << HARDWARE_TO_NS_SHIFT;
 }
 
-static void __cpuinit arch_timer_setup(unsigned int cpu)
+static void arch_timer_setup(unsigned int cpu)
 {
        unsigned int txdivtime;
        struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
@@ -154,7 +154,7 @@ static void __cpuinit arch_timer_setup(unsigned int cpu)
        }
 }
 
-static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
+static int arch_timer_cpu_notify(struct notifier_block *self,
                                           unsigned long action, void *hcpu)
 {
        int cpu = (long)hcpu;
@@ -169,7 +169,7 @@ static int __cpuinit arch_timer_cpu_notify(struct notifier_block *self,
        return NOTIFY_OK;
 }
 
-static struct notifier_block __cpuinitdata arch_timer_cpu_nb = {
+static struct notifier_block arch_timer_cpu_nb = {
        .notifier_call = arch_timer_cpu_notify,
 };
 
index efdca3263afef24fc557862dc7f0e622effdb72f..1b04b7e1d39b91c223c993baa88b44d408c3609e 100644 (file)
@@ -167,7 +167,7 @@ static irqreturn_t armada_370_xp_timer_interrupt(int irq, void *dev_id)
 /*
  * Setup the local clock events for a CPU.
  */
-static int __cpuinit armada_370_xp_timer_setup(struct clock_event_device *evt)
+static int armada_370_xp_timer_setup(struct clock_event_device *evt)
 {
        u32 u;
        int cpu = smp_processor_id();
@@ -205,7 +205,7 @@ static void  armada_370_xp_timer_stop(struct clock_event_device *evt)
        disable_percpu_irq(evt->irq);
 }
 
-static struct local_timer_ops armada_370_xp_local_timer_ops __cpuinitdata = {
+static struct local_timer_ops armada_370_xp_local_timer_ops = {
        .setup  = armada_370_xp_timer_setup,
        .stop   =  armada_370_xp_timer_stop,
 };
index e5dc9129ca263f0a9cba409f7d866e1dc73b086c..62876baa3ab9c2f69c680e316a4801b11e89777f 100644 (file)
@@ -184,7 +184,7 @@ static struct irqaction sirfsoc_timer1_irq = {
        .handler = sirfsoc_timer_interrupt,
 };
 
-static int __cpuinit sirfsoc_local_timer_setup(struct clock_event_device *ce)
+static int sirfsoc_local_timer_setup(struct clock_event_device *ce)
 {
        /* Use existing clock_event for cpu 0 */
        if (!smp_processor_id())
@@ -216,7 +216,7 @@ static void sirfsoc_local_timer_stop(struct clock_event_device *ce)
        remove_irq(sirfsoc_timer1_irq.irq, &sirfsoc_timer1_irq);
 }
 
-static struct local_timer_ops sirfsoc_local_timer_ops __cpuinitdata = {
+static struct local_timer_ops sirfsoc_local_timer_ops = {
        .setup  = sirfsoc_local_timer_setup,
        .stop   = sirfsoc_local_timer_stop,
 };
index 19ceaa60e0f45c755fd67d840e8ee90de320d1ca..ee7c50312066cc4b750ee592fdd2956809eeebd8 100644 (file)
@@ -414,7 +414,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic)
        writel_relaxed(1, base + GIC_DIST_CTRL);
 }
 
-static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
+static void gic_cpu_init(struct gic_chip_data *gic)
 {
        void __iomem *dist_base = gic_data_dist_base(gic);
        void __iomem *base = gic_data_cpu_base(gic);
@@ -702,8 +702,8 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
 }
 
 #ifdef CONFIG_SMP
-static int __cpuinit gic_secondary_init(struct notifier_block *nfb,
-                                       unsigned long action, void *hcpu)
+static int gic_secondary_init(struct notifier_block *nfb, unsigned long action,
+                             void *hcpu)
 {
        if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
                gic_cpu_init(&gic_data[0]);
@@ -714,7 +714,7 @@ static int __cpuinit gic_secondary_init(struct notifier_block *nfb,
  * Notifier for enabling the GIC CPU interface. Set an arbitrarily high
  * priority because the GIC needs to be up before the ARM generic timers.
  */
-static struct notifier_block __cpuinitdata gic_cpu_notifier = {
+static struct notifier_block gic_cpu_notifier = {
        .notifier_call = gic_secondary_init,
        .priority = 100,
 };