Merge master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
[linux-drm-fsl-dcu.git] / kernel / softirq.c
index 14e1a14f94d20538f269049642d8a455f6dfb9ef..0b9886a00e74ba33ed59cafb8b02bc9d01570575 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/kthread.h>
 #include <linux/rcupdate.h>
 #include <linux/smp.h>
+#include <linux/tick.h>
 
 #include <asm/irq.h>
 /*
@@ -278,9 +279,11 @@ EXPORT_SYMBOL(do_softirq);
  */
 void irq_enter(void)
 {
-       account_system_vtime(current);
-       add_preempt_count(HARDIRQ_OFFSET);
-       trace_hardirq_enter();
+       __irq_enter();
+#ifdef CONFIG_NO_HZ
+       if (idle_cpu(smp_processor_id()))
+               tick_nohz_update_jiffies();
+#endif
 }
 
 #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED
@@ -299,6 +302,12 @@ void irq_exit(void)
        sub_preempt_count(IRQ_EXIT_OFFSET);
        if (!in_interrupt() && local_softirq_pending())
                invoke_softirq();
+
+#ifdef CONFIG_NO_HZ
+       /* Make sure that timer wheel updates are propagated */
+       if (!in_interrupt() && idle_cpu(smp_processor_id()) && !need_resched())
+               tick_nohz_stop_sched_tick();
+#endif
        preempt_enable_no_resched();
 }
 
@@ -584,6 +593,7 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                p = kthread_create(ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu);
                if (IS_ERR(p)) {
                        printk("ksoftirqd for %i failed\n", hotcpu);
@@ -593,16 +603,19 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb,
                per_cpu(ksoftirqd, hotcpu) = p;
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                wake_up_process(per_cpu(ksoftirqd, hotcpu));
                break;
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                if (!per_cpu(ksoftirqd, hotcpu))
                        break;
                /* Unbind so it can run.  Fall thru. */
                kthread_bind(per_cpu(ksoftirqd, hotcpu),
                             any_online_cpu(cpu_online_map));
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                p = per_cpu(ksoftirqd, hotcpu);
                per_cpu(ksoftirqd, hotcpu) = NULL;
                kthread_stop(p);