Allow for HRTIMER_RESTART in a CB_IRQSAFE callback.
PATCH 1/2 Allow for HRTIMER_RESTART in a CB_IRQSAFE callback.
This patch simply requeues a CB if HRTIMER_RESTART is set in CB_IRQSAFE hrtimer_interrupt.
-- Steve
Signed-off-by Steven Rostedt <[email protected]>
kernel/hrtimer.c +4 -2
@@ -838,8 +838,10 @@ int hrtimer_interrupt(void)if (timer->mode ==HRTIMER_CB_IRQSAFE ) {int ret = timer->function (timer); -BUG_ON (ret !=HRTIMER_NORESTART ); - timer->node.rb_parent =HRTIMER_INACTIVE ; +if (ret ==HRTIMER_RESTART ) +enqueue_hrtimer (timer, base); +else + timer->node.rb_parent =HRTIMER_INACTIVE ; }else {hrtimer_add_cb_pending (timer, base); raise =1 ;