>From 3440baaed3b21138f6fc8b80e03769e3903f9c11 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Wed, 7 Nov 2007 22:51:44 -0800 Subject: [PATCH] hrtimer: Add timer back to pending list if it was reactivated and has already expired again. This avoids problems with timer hardware that does not respond to timers set in the past. Signed-off-by: Brian Swetland --- kernel/hrtimer.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 22a2514..7c60769 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1149,8 +1149,14 @@ static void run_hrtimer_softirq(struct softirq_action *h) * If the timer was rearmed on another CPU, reprogram * the event device. */ - if (timer->base->first == &timer->node) - hrtimer_reprogram(timer, timer->base); + if (timer->base->first == &timer->node) { + if(hrtimer_reprogram(timer, timer->base)) { + __remove_hrtimer(timer, timer->base, + HRTIMER_STATE_PENDING, 0); + list_add_tail(&timer->cb_entry, + &cpu_base->cb_pending); + } + } } } spin_unlock_irq(&cpu_base->lock); -- 1.5.3.5