Skip to content

Commit

Permalink
ARM: smp_twd: make local_timer_stop a symbol instead of a #define
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marc Zyngier committed Mar 13, 2012
1 parent a282114 commit abde710
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 1 addition & 5 deletions arch/arm/include/asm/localtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,13 @@ void percpu_timer_setup(void);

#include "smp_twd.h"

#define local_timer_stop(c) twd_timer_stop((c))

#else
#endif

/*
* Stop the local timer
*/
void local_timer_stop(struct clock_event_device *);

#endif

/*
* Setup a local timer interrupt for a CPU.
*/
Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/smp_twd.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ struct clock_event_device;
extern void __iomem *twd_base;

void twd_timer_setup(struct clock_event_device *);
void twd_timer_stop(struct clock_event_device *);

#endif
7 changes: 6 additions & 1 deletion arch/arm/kernel/smp_twd.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,17 @@ int twd_timer_ack(void)
return 0;
}

void twd_timer_stop(struct clock_event_device *clk)
static void twd_timer_stop(struct clock_event_device *clk)
{
twd_set_mode(CLOCK_EVT_MODE_UNUSED, clk);
disable_percpu_irq(clk->irq);
}

/* Temporary hack to be removed when all TWD users are converted to
the new registration interface */
void local_timer_stop(struct clock_event_device *clk)
__attribute__ ((alias ("twd_timer_stop")));

#ifdef CONFIG_CPU_FREQ

/*
Expand Down

0 comments on commit abde710

Please sign in to comment.