tick-sched: change the cpu that updates rq_stats
It can happen that the scheduler tick stops on cpu 0 but keeps
running on some other cpu. Make the cpu in-charge of updating
the jiffies also update the rq_stats.
Change-Id: Idb1a8132bd96500c68c516b4a99663965cec28e1
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index e54ba63..e8f9cce 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -807,8 +807,7 @@
update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING);
-
- if ((rq_info.init == 1) && (cpu == 0)) {
+ if ((rq_info.init == 1) && (tick_do_timer_cpu == cpu)) {
/*
* update run queue statistics