commit 217b7d5d38bf2d2a34187e46e2f72d778a0e4b42 Author: Corcodel Marian Date: Tue Jul 5 13:32:06 2016 +0300 Try to stall 0 cycles on __remove_hrtimer. diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index fa0b983..ddc34f2 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -889,13 +889,19 @@ static int enqueue_hrtimer(struct hrtimer *timer, * reprogram to zero. This is useful, when the context does a reprogramming * anyway (e.g. timer interrupt) */ -static void __remove_hrtimer(struct hrtimer *timer, +static inline void __remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, u8 newstate, int reprogram) { - struct hrtimer_cpu_base *cpu_base = base->cpu_base; - u8 state = timer->state; + struct hrtimer_cpu_base *cpu_base; + u8 state; + + if (!base->cpu_base) { + return; + } + state = timer->state; + cpu_base = base->cpu_base; timer->state = newstate; if (!(state & HRTIMER_STATE_ENQUEUED)) return;