Loading kernel/time/hrtimer.c +5 −6 Original line number Diff line number Diff line Loading @@ -845,7 +845,7 @@ static int enqueue_hrtimer(struct hrtimer *timer, base->cpu_base->active_bases |= 1 << base->index; /* Pairs with the lockless read in hrtimer_is_queued() */ WRITE_ONCE(timer->state, HRTIMER_STATE_ENQUEUED); WRITE_ONCE(timer->state, timer->state | HRTIMER_STATE_ENQUEUED); return timerqueue_add(&base->active, &timer->node); } Loading @@ -865,12 +865,9 @@ static void __remove_hrtimer(struct hrtimer *timer, u8 newstate, int reprogram) { struct hrtimer_cpu_base *cpu_base = base->cpu_base; unsigned int state = timer->state; if (!(state & HRTIMER_STATE_ENQUEUED)) if (!(timer->state & HRTIMER_STATE_ENQUEUED)) goto out; /* Pairs with the lockless read in hrtimer_is_queued() */ WRITE_ONCE(timer->state, newstate); if (!timerqueue_del(&base->active, &timer->node)) cpu_base->active_bases &= ~(1 << base->index); Loading @@ -893,7 +890,9 @@ static void __remove_hrtimer(struct hrtimer *timer, * We need to preserve PINNED state here, otherwise we may end up * migrating pinned hrtimers as well. */ timer->state = newstate | (timer->state & HRTIMER_STATE_PINNED); /* Pairs with the lockless read in hrtimer_is_queued() */ WRITE_ONCE(timer->state, newstate | (timer->state & HRTIMER_STATE_PINNED)); } /* Loading Loading
kernel/time/hrtimer.c +5 −6 Original line number Diff line number Diff line Loading @@ -845,7 +845,7 @@ static int enqueue_hrtimer(struct hrtimer *timer, base->cpu_base->active_bases |= 1 << base->index; /* Pairs with the lockless read in hrtimer_is_queued() */ WRITE_ONCE(timer->state, HRTIMER_STATE_ENQUEUED); WRITE_ONCE(timer->state, timer->state | HRTIMER_STATE_ENQUEUED); return timerqueue_add(&base->active, &timer->node); } Loading @@ -865,12 +865,9 @@ static void __remove_hrtimer(struct hrtimer *timer, u8 newstate, int reprogram) { struct hrtimer_cpu_base *cpu_base = base->cpu_base; unsigned int state = timer->state; if (!(state & HRTIMER_STATE_ENQUEUED)) if (!(timer->state & HRTIMER_STATE_ENQUEUED)) goto out; /* Pairs with the lockless read in hrtimer_is_queued() */ WRITE_ONCE(timer->state, newstate); if (!timerqueue_del(&base->active, &timer->node)) cpu_base->active_bases &= ~(1 << base->index); Loading @@ -893,7 +890,9 @@ static void __remove_hrtimer(struct hrtimer *timer, * We need to preserve PINNED state here, otherwise we may end up * migrating pinned hrtimers as well. */ timer->state = newstate | (timer->state & HRTIMER_STATE_PINNED); /* Pairs with the lockless read in hrtimer_is_queued() */ WRITE_ONCE(timer->state, newstate | (timer->state & HRTIMER_STATE_PINNED)); } /* Loading