summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2010-05-15 17:49:46 -0700
committerGary King <gking@nvidia.com>2010-05-20 10:53:31 -0700
commitb344cce5024b2742219db782aeeb38772a05325a (patch)
tree9285078fe841fe401cb0d8628126b4c01da41ff6 /kernel
parent4bc4768e06afa53392678197d59b6394cdab5e1c (diff)
tegra timers: Added safety net for SMP tick handover.
Made sure that jiffies update duty is not stuck with off-line CPU: if this situation is detected, re-assign the tick ownership respectively (should fix bug 683277). Replaced spin-locks in timer access code with local interrupt control: local timers are "local", and do not need interprocessor protection. Change-Id: Ib0d690d8558724f7da384aba8b5cdf3d5ea8fdbb Reviewed-on: http://git-master/r/1415 Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 4012da672821..6737d68fdb8d 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -639,9 +639,15 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
* into a long sleep. If two cpus happen to assign themself to
* this duty, then the jiffies update is still serialized by
* xtime_lock.
+ *
+ * Also check if the do_timer duty is stuck with off-line cpu.
+ * Then, use the same remedy as for dropped duty: re-assign it
+ * to the cpu servicing this tick.
*/
- if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE))
+ if ((unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) ||
+ (!cpu_online(tick_do_timer_cpu))) {
tick_do_timer_cpu = cpu;
+ }
#endif
/* Check, if the jiffies need an update */