Merge tag '3.9-rc3-smp-6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/sstabe...
[firefly-linux-kernel-4.4.55.git] / kernel / softirq.c
index 14d7758074aadf4d1c43947ecef675e8bb6c044e..b5197dcb0dadb236ea81739bb78c703a01787404 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();
 }
 
@@ -620,8 +629,7 @@ static void remote_softirq_receive(void *data)
        unsigned long flags;
        int softirq;
 
-       softirq = cp->priv;
-
+       softirq = *(int *)cp->info;
        local_irq_save(flags);
        __local_trigger(cp, softirq);
        local_irq_restore(flags);
@@ -631,9 +639,8 @@ static int __try_remote_softirq(struct call_single_data *cp, int cpu, int softir
 {
        if (cpu_online(cpu)) {
                cp->func = remote_softirq_receive;
-               cp->info = cp;
+               cp->info = &softirq;
                cp->flags = 0;
-               cp->priv = softirq;
 
                __smp_call_function_single(cpu, cp, 0);
                return 0;