aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/localtimer.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-19 04:53:04 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-19 05:00:03 -0400
commitfc6191dd301e3bc8cbb142aab1a2ec4e699cb2de (patch)
treec1694dc15bdebd05ba4df70b7bdeba3504aaa649 /arch/sh/kernel/localtimer.c
parente055d41ff5e9761c5572a6f4ce94bcd82bfbb28f (diff)
sh: Fix up clockevents broadcasting.
This fixes up the clockevents broadcasting code as detailed in commit ee348d5a1d810bc9958cabb7c27302aab235d36e ("[ARM] realview: fix broadcast tick support"). This saves us from having to do strange ordering things with the broadcast clockevent device, relying on the rating instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/localtimer.c')
-rw-r--r--arch/sh/kernel/localtimer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/sh/kernel/localtimer.c b/arch/sh/kernel/localtimer.c
index 96e8eaea1e62..0b04e7d4a9b9 100644
--- a/arch/sh/kernel/localtimer.c
+++ b/arch/sh/kernel/localtimer.c
@@ -22,6 +22,7 @@
22#include <linux/jiffies.h> 22#include <linux/jiffies.h>
23#include <linux/percpu.h> 23#include <linux/percpu.h>
24#include <linux/clockchips.h> 24#include <linux/clockchips.h>
25#include <linux/hardirq.h>
25#include <linux/irq.h> 26#include <linux/irq.h>
26 27
27static DEFINE_PER_CPU(struct clock_event_device, local_clockevent); 28static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
@@ -33,7 +34,9 @@ void local_timer_interrupt(void)
33{ 34{
34 struct clock_event_device *clk = &__get_cpu_var(local_clockevent); 35 struct clock_event_device *clk = &__get_cpu_var(local_clockevent);
35 36
37 irq_enter();
36 clk->event_handler(clk); 38 clk->event_handler(clk);
39 irq_exit();
37} 40}
38 41
39static void dummy_timer_set_mode(enum clock_event_mode mode, 42static void dummy_timer_set_mode(enum clock_event_mode mode,
@@ -46,8 +49,10 @@ void __cpuinit local_timer_setup(unsigned int cpu)
46 struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); 49 struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
47 50
48 clk->name = "dummy_timer"; 51 clk->name = "dummy_timer";
49 clk->features = CLOCK_EVT_FEAT_DUMMY; 52 clk->features = CLOCK_EVT_FEAT_ONESHOT |
50 clk->rating = 200; 53 CLOCK_EVT_FEAT_PERIODIC |
54 CLOCK_EVT_FEAT_DUMMY;
55 clk->rating = 400;
51 clk->mult = 1; 56 clk->mult = 1;
52 clk->set_mode = dummy_timer_set_mode; 57 clk->set_mode = dummy_timer_set_mode;
53 clk->broadcast = smp_timer_broadcast; 58 clk->broadcast = smp_timer_broadcast;