|
@@ -22,6 +22,7 @@
|
|
#include <linux/jiffies.h>
|
|
#include <linux/jiffies.h>
|
|
#include <linux/percpu.h>
|
|
#include <linux/percpu.h>
|
|
#include <linux/clockchips.h>
|
|
#include <linux/clockchips.h>
|
|
|
|
+#include <linux/hardirq.h>
|
|
#include <linux/irq.h>
|
|
#include <linux/irq.h>
|
|
|
|
|
|
static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
|
|
static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
|
|
@@ -33,7 +34,9 @@ void local_timer_interrupt(void)
|
|
{
|
|
{
|
|
struct clock_event_device *clk = &__get_cpu_var(local_clockevent);
|
|
struct clock_event_device *clk = &__get_cpu_var(local_clockevent);
|
|
|
|
|
|
|
|
+ irq_enter();
|
|
clk->event_handler(clk);
|
|
clk->event_handler(clk);
|
|
|
|
+ irq_exit();
|
|
}
|
|
}
|
|
|
|
|
|
static void dummy_timer_set_mode(enum clock_event_mode mode,
|
|
static void dummy_timer_set_mode(enum clock_event_mode mode,
|
|
@@ -46,8 +49,10 @@ void __cpuinit local_timer_setup(unsigned int cpu)
|
|
struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
|
|
struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
|
|
|
|
|
|
clk->name = "dummy_timer";
|
|
clk->name = "dummy_timer";
|
|
- clk->features = CLOCK_EVT_FEAT_DUMMY;
|
|
|
|
- clk->rating = 200;
|
|
|
|
|
|
+ clk->features = CLOCK_EVT_FEAT_ONESHOT |
|
|
|
|
+ CLOCK_EVT_FEAT_PERIODIC |
|
|
|
|
+ CLOCK_EVT_FEAT_DUMMY;
|
|
|
|
+ clk->rating = 400;
|
|
clk->mult = 1;
|
|
clk->mult = 1;
|
|
clk->set_mode = dummy_timer_set_mode;
|
|
clk->set_mode = dummy_timer_set_mode;
|
|
clk->broadcast = smp_timer_broadcast;
|
|
clk->broadcast = smp_timer_broadcast;
|