--- x/kernel/time/hrtimer.c +++ y/kernel/time/hrtimer.c @@ -1718,7 +1718,7 @@ EXPORT_SYMBOL_GPL(hrtimer_active); static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, struct hrtimer_clock_base *base, struct hrtimer *timer, ktime_t *now, - unsigned long flags) __must_hold(&cpu_base->lock) + unsigned long flags, bool soft) __must_hold(&cpu_base->lock) { enum hrtimer_restart (*fn)(struct hrtimer *); bool expires_in_hardirq; @@ -1755,6 +1755,8 @@ static void __run_hrtimer(struct hrtimer * is dropped. */ raw_spin_unlock_irqrestore(&cpu_base->lock, flags); + if (soft) + hrtimer_cpu_base_unlock_expiry(cpu_base); trace_hrtimer_expire_entry(timer, now); expires_in_hardirq = lockdep_hrtimer_enter(timer); @@ -1762,6 +1764,8 @@ static void __run_hrtimer(struct hrtimer lockdep_hrtimer_exit(expires_in_hardirq); trace_hrtimer_expire_exit(timer); + if (soft) + hrtimer_cpu_base_lock_expiry(cpu_base); raw_spin_lock_irq(&cpu_base->lock); /* @@ -1822,7 +1826,8 @@ static void __hrtimer_run_queues(struct if (basenow < hrtimer_get_softexpires_tv64(timer)) break; - __run_hrtimer(cpu_base, base, timer, &basenow, flags); + __run_hrtimer(cpu_base, base, timer, &basenow, flags, + active_mask == HRTIMER_ACTIVE_SOFT); if (active_mask == HRTIMER_ACTIVE_SOFT) hrtimer_sync_wait_running(cpu_base, flags); }