ARM: local timers: make the runtime registration interface mandatory
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 10 Jan 2012 23:38:25 +0000 (23:38 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 13 Mar 2012 13:45:55 +0000 (13:45 +0000)
Remove all traces of the compile-time local timer interface,
and make the runtime selection mandatory.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/localtimer.h
arch/arm/kernel/smp.c

index 955eed10ffb5f48a601315d37d0ffc0135bcfb45..f77ffc1eb0c2b0d2e5a6125169da694b33bd2a0f 100644 (file)
@@ -19,38 +19,12 @@ struct local_timer_ops {
        void (*stop)(struct clock_event_device *);
 };
 
-/*
- * Setup a per-cpu timer, whether it be a local timer or dummy broadcast
- */
-void percpu_timer_setup(void);
-
 #ifdef CONFIG_LOCAL_TIMERS
-/*
- * Stop the local timer
- */
-void local_timer_stop(struct clock_event_device *);
-
-/*
- * Setup a local timer interrupt for a CPU.
- */
-int local_timer_setup(struct clock_event_device *);
-
 /*
  * Register a local timer driver
  */
 int local_timer_register(struct local_timer_ops *);
-
 #else
-
-static inline int local_timer_setup(struct clock_event_device *evt)
-{
-       return -ENXIO;
-}
-
-static inline void local_timer_stop(struct clock_event_device *evt)
-{
-}
-
 static inline int local_timer_register(struct local_timer_ops *ops)
 {
        return -ENXIO;
index 89bb02c90ae1cd445a91250843a5bae68fecde3a..1ad84a6c9bfb3e0469ef848bbd10152558f07008 100644 (file)
@@ -246,6 +246,8 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid)
        store_cpu_topology(cpuid);
 }
 
+static void percpu_timer_setup(void);
+
 /*
  * This is the secondary CPU boot entry.  We're using this CPUs
  * idle thread stack, but a set of temporary page tables.
@@ -472,21 +474,7 @@ int local_timer_register(struct local_timer_ops *ops)
 }
 #endif
 
-int __cpuinit __attribute__ ((weak)) local_timer_setup(struct clock_event_device *clk)
-{
-       if (lt_ops)
-               return lt_ops->setup(clk);
-
-       return -ENXIO;
-}
-
-void __attribute__ ((weak)) local_timer_stop(struct clock_event_device *clk)
-{
-       if (lt_ops)
-               lt_ops->stop(clk);
-}
-
-void __cpuinit percpu_timer_setup(void)
+static void __cpuinit percpu_timer_setup(void)
 {
        unsigned int cpu = smp_processor_id();
        struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);
@@ -494,7 +482,7 @@ void __cpuinit percpu_timer_setup(void)
        evt->cpumask = cpumask_of(cpu);
        evt->broadcast = smp_timer_broadcast;
 
-       if (local_timer_setup(evt))
+       if (!lt_ops || lt_ops->setup(evt))
                broadcast_timer_setup(evt);
 }
 
@@ -509,7 +497,8 @@ static void percpu_timer_stop(void)
        unsigned int cpu = smp_processor_id();
        struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);
 
-       local_timer_stop(evt);
+       if (lt_ops)
+               lt_ops->stop(evt);
 }
 #endif
 
This page took 0.035265 seconds and 5 git commands to generate.