Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: smp_twd: make local_timer_stop a symbol instead of a #define

When CONFIG_HAVE_ARM_TWD is selected, local_timer_stop is a #define,
while all other local timers are using a real function.

Convert it to an alias of twd_timer_stop, as it helps converting
all local timers to another internal API in a sane way.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

+7 -7
+1 -5
arch/arm/include/asm/localtimer.h
··· 26 26 27 27 #include "smp_twd.h" 28 28 29 - #define local_timer_stop(c) twd_timer_stop((c)) 30 - 31 - #else 29 + #endif 32 30 33 31 /* 34 32 * Stop the local timer 35 33 */ 36 34 void local_timer_stop(struct clock_event_device *); 37 - 38 - #endif 39 35 40 36 /* 41 37 * Setup a local timer interrupt for a CPU.
-1
arch/arm/include/asm/smp_twd.h
··· 23 23 extern void __iomem *twd_base; 24 24 25 25 void twd_timer_setup(struct clock_event_device *); 26 - void twd_timer_stop(struct clock_event_device *); 27 26 28 27 #endif
+6 -1
arch/arm/kernel/smp_twd.c
··· 87 87 return 0; 88 88 } 89 89 90 - void twd_timer_stop(struct clock_event_device *clk) 90 + static void twd_timer_stop(struct clock_event_device *clk) 91 91 { 92 92 twd_set_mode(CLOCK_EVT_MODE_UNUSED, clk); 93 93 disable_percpu_irq(clk->irq); 94 94 } 95 + 96 + /* Temporary hack to be removed when all TWD users are converted to 97 + the new registration interface */ 98 + void local_timer_stop(struct clock_event_device *clk) 99 + __attribute__ ((alias ("twd_timer_stop"))); 95 100 96 101 #ifdef CONFIG_CPU_FREQ 97 102