Merge commit '8700c95adb03' into timers/nohz
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / softirq.c
index 14d7758074aadf4d1c43947ecef675e8bb6c044e..51a09d56e78b875cc2c329afb59876f52afdaf8b 100644 (file)
@@ -329,6 +329,19 @@ static inline void invoke_softirq(void)
                wakeup_softirqd();
 }
 
+static inline void tick_irq_exit(void)
+{
+#ifdef CONFIG_NO_HZ_COMMON
+       int cpu = smp_processor_id();
+
+       /* Make sure that timer wheel updates are propagated */
+       if ((idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) {
+               if (!in_interrupt())
+                       tick_nohz_irq_exit();
+       }
+#endif
+}
+
 /*
  * Exit an interrupt context. Process softirqs if needed and possible:
  */
@@ -346,11 +359,7 @@ void irq_exit(void)
        if (!in_interrupt() && local_softirq_pending())
                invoke_softirq();
 
-#ifdef CONFIG_NO_HZ
-       /* Make sure that timer wheel updates are propagated */
-       if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched())
-               tick_nohz_irq_exit();
-#endif
+       tick_irq_exit();
        rcu_irq_exit();
 }