diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 765d9e73c2ba..fb7d30c29532 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -154,6 +154,7 @@ enum hrtimer_base_type { * struct hrtimer_cpu_base - the per cpu clock bases * @lock: lock protecting the base and associated clock bases * and timers + * @cpu: cpu number * @active_bases: Bitfield to mark bases with active timers * @clock_was_set: Indicates that clock was set from irq context. * @expires_next: absolute time of the next event which was scheduled @@ -169,6 +170,7 @@ enum hrtimer_base_type { */ struct hrtimer_cpu_base { raw_spinlock_t lock; + unsigned int cpu; unsigned int active_bases; unsigned int clock_was_set; #ifdef CONFIG_HIGH_RES_TIMERS diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 3b5e3d3a9c84..1f14b31e6bf0 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1660,6 +1660,7 @@ static void __cpuinit init_hrtimers_cpu(int cpu) } cpu_base->active_bases = 0; + cpu_base->cpu = cpu; hrtimer_init_hres(cpu_base); }