timer: Initialize global deferrable timer

Initialize timer_base_deferrable variables properly along with
the initialization of the per cpu timers.

Change-Id: I14599cb6ab2fcc657edc7489ee1a55535183e3db
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
Kyle Yan 2017-03-07 11:51:38 -08:00 • committed by Gerrit - the friendly Code Review server
commit 85e1beff68

View file

@ -1942,10 +1942,19 @@ static void __init init_timer_cpu(int cpu)
}
}
static inline void init_timer_deferrable_global(void)
{
timer_base_deferrable.cpu = nr_cpu_ids;
raw_spin_lock_init(&timer_base_deferrable.lock);
timer_base_deferrable.clk = jiffies;
}
static void __init init_timer_cpus(void)
{
int cpu;
init_timer_deferrable_global();
for_each_possible_cpu(cpu)
init_timer_cpu(cpu);
}