X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=kvmfornfv.git;a=blobdiff_plain;f=kernel%2Fkernel%2Ftime%2Fhrtimer.c;h=5d193396e30459906f39f3371ae6d6dc757ea739;hp=2c6be169bdc75d04bc6054900121b55a2b738574;hb=6d8b23062207c761e4606d1eae0e43cf36141a44;hpb=6744cd0d1d2faad4e7b345563b91888d32db221e diff --git a/kernel/kernel/time/hrtimer.c b/kernel/kernel/time/hrtimer.c index 2c6be169b..5d193396e 100644 --- a/kernel/kernel/time/hrtimer.c +++ b/kernel/kernel/time/hrtimer.c @@ -583,6 +583,12 @@ static int hrtimer_reprogram(struct hrtimer *timer, if (hrtimer_callback_running(timer)) return 0; + if (base->cpu_base != cpu_base) + return 0; + + if (cpu_base->in_hrtirq) + return 0; + /* * CLOCK_REALTIME timer might be requested with an absolute * expiry time which is less than base->offset. Nothing wrong @@ -613,12 +619,11 @@ static int hrtimer_reprogram(struct hrtimer *timer, if (cpu_base->hang_detected) return 0; + cpu_base->expires_next = expires; /* * Clockevents returns -ETIME, when the event was in the past. */ - res = tick_program_event(expires, 0); - if (!IS_ERR_VALUE(res)) - cpu_base->expires_next = expires; + res = tick_program_event(expires, 1); return res; }