@@ -17,6 +17,7 @@
#include <linux/clockchips.h>
#include <linux/irq.h>
#include <linux/io.h>
+#include <linux/percpu.h>
#include <asm/smp_twd.h>
#include <asm/localtimer.h>
@@ -26,6 +27,7 @@
void __iomem *twd_base;
static unsigned long twd_timer_rate;
+static DEFINE_PER_CPU(struct clock_event_device *, twd_ce);
static struct clock_event_device __percpu **twd_evt;
@@ -177,6 +179,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
this_cpu_clk = __this_cpu_ptr(twd_evt);
*this_cpu_clk = clk;
+ __get_cpu_var(twd_ce) = clk;
+
clockevents_config_and_register(clk, twd_timer_rate,
0xf, 0xffffffff);
enable_percpu_irq(clk->irq, 0);