/* When the timer's base is locked, and the timer removed from list, it is possible to set timer->base = NULL and drop the lock: the timer remains locked.  */
static struct tvec_base* lock_timer_base(struct timer_list *timer, unsigned long *flags) __acquires(timer -> base->lock)
/* When the timer's base is locked, and the timer removed from list, it is possible to set timer->base = NULL and drop the lock: the timer remains locked.  */
static struct tvec_base* lock_timer_base(struct timer_list *timer, unsigned long *flags) __acquires(timer -> base->lock)
{
	struct tvec_base *base;
	for (;;) {
		struct tvec_base *prelock_base = timer->base;
		base = tbase_get_base(prelock_base);
		if (likely(base != NULL)) {
			spin_lock_irqsave(&base->lock, *flags);
			if (likely(prelock_base == timer->base))
				return base;
			spin_unlock_irqrestore(&base->lock, *flags);
		}
		cpu_relax();
	}
}