aboutsummaryrefslogtreecommitdiff
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2014-07-16 17:57:27 -0500
committerGary S. Robertson <gary.robertson@linaro.org>2014-07-16 17:57:27 -0500
commit5d8c39dfa92c11553a1091717407aeaddc3de603 (patch)
tree0df1e82ebdde6b9e3722fd16f9195be36a73c144 /kernel/hrtimer.c
parent0993b170ac452761d5b49bca4f7022f2f14c50bc (diff)
parentc0cbbdebe91a944d653ca75670b77bbf57498150 (diff)
Merge tag 'v3.14.12' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-lng-v3.14.xlinux-lng-3.14.12-2014.07
This is the 3.14.12 stable release Conflicts: arch/arm/mm/proc-v7-3level.S kernel/hrtimer.c mm/hugetlb.c
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index f8a5880f96c9..e3cd58bc7513 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -234,6 +234,11 @@ again:
goto again;
}
timer->base = new_base;
+ } else {
+ if (cpu != this_cpu && hrtimer_check_target(timer, new_base)) {
+ cpu = this_cpu;
+ goto again;
+ }
}
return new_base;
}
@@ -569,6 +574,23 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
cpu_base->expires_next.tv64 = expires_next.tv64;
+ /*
+ * If a hang was detected in the last timer interrupt then we
+ * leave the hang delay active in the hardware. We want the
+ * system to make progress. That also prevents the following
+ * scenario:
+ * T1 expires 50ms from now
+ * T2 expires 5s from now
+ *
+ * T1 is removed, so this code is called and would reprogram
+ * the hardware to 5s from now. Any hrtimer_start after that
+ * will not reprogram the hardware due to hang_detected being
+ * set. So we'd effectivly block all timers until the T2 event
+ * fires.
+ */
+ if (cpu_base->hang_detected)
+ return;
+
tick_program_event(cpu_base->expires_next, 1);
}