From acc6b9b8ac4546066221f6ad0e57310ad3a9ba50 Mon Sep 17 00:00:00 2001 From: Jia Hongtao Date: Thu, 9 Apr 2015 15:03:29 +0800 Subject: Do not miss inactive (deferred) timers The inactive timer could not be raised casued by this patch: https://lkml.org/lkml/2014/2/28/230 This makes the system using deferred timer like CPUfreq not working. Signed-off-by: Jia Hongtao Change-Id: I8e1b6dbcb2845c6e502d9ff50617e8c30d2da7c0 Reviewed-on: http://git.am.freescale.net:8181/34890 Tested-by: Review Code-CDREVIEW Reviewed-by: Yang Li Reviewed-by: Honghua Yin diff --git a/kernel/timer.c b/kernel/timer.c index 3b79da2..20c0039 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1486,18 +1486,11 @@ void run_local_timers(void) } #endif - if (!base->active_timers) - goto out; + raise_softirq(TIMER_SOFTIRQ); - /* Check whether the next pending timer has expired */ - if (time_before_eq(base->next_timer, jiffies)) - raise_softirq(TIMER_SOFTIRQ); -out: #ifdef CONFIG_PREEMPT_RT_FULL rt_spin_unlock_after_trylock_in_irq(&base->lock); #endif - /* The ; ensures that gcc won't complain in the !RT case */ - ; } #ifdef __ARCH_WANT_SYS_ALARM -- cgit v0.10.2