diff options
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r-- | kernel/hrtimer.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index d55092ceee29..e3724fdac2da 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -569,6 +569,23 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal) | |||
569 | 569 | ||
570 | cpu_base->expires_next.tv64 = expires_next.tv64; | 570 | cpu_base->expires_next.tv64 = expires_next.tv64; |
571 | 571 | ||
572 | /* | ||
573 | * If a hang was detected in the last timer interrupt then we | ||
574 | * leave the hang delay active in the hardware. We want the | ||
575 | * system to make progress. That also prevents the following | ||
576 | * scenario: | ||
577 | * T1 expires 50ms from now | ||
578 | * T2 expires 5s from now | ||
579 | * | ||
580 | * T1 is removed, so this code is called and would reprogram | ||
581 | * the hardware to 5s from now. Any hrtimer_start after that | ||
582 | * will not reprogram the hardware due to hang_detected being | ||
583 | * set. So we'd effectivly block all timers until the T2 event | ||
584 | * fires. | ||
585 | */ | ||
586 | if (cpu_base->hang_detected) | ||
587 | return; | ||
588 | |||
572 | if (cpu_base->expires_next.tv64 != KTIME_MAX) | 589 | if (cpu_base->expires_next.tv64 != KTIME_MAX) |
573 | tick_program_event(cpu_base->expires_next, 1); | 590 | tick_program_event(cpu_base->expires_next, 1); |
574 | } | 591 | } |