Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[linux-flexiantxendom0-3.2.10.git] / kernel / softirq.c
index c82d95a..671f959 100644 (file)
@@ -297,7 +297,7 @@ void irq_enter(void)
        int cpu = smp_processor_id();
 
        rcu_irq_enter();
-       if (idle_cpu(cpu) && !in_interrupt()) {
+       if (is_idle_task(current) && !in_interrupt()) {
                /*
                 * Prevent raise_softirq from needlessly waking up ksoftirqd
                 * here, as softirq will be serviced on return from interrupt.
@@ -343,7 +343,7 @@ void irq_exit(void)
                tick_nohz_irq_exit();
 #endif
        rcu_irq_exit();
-       preempt_enable_no_resched();
+       sched_preempt_enable_no_resched();
 }
 
 /*
@@ -375,6 +375,12 @@ void raise_softirq(unsigned int nr)
        local_irq_restore(flags);
 }
 
+void __raise_softirq_irqoff(unsigned int nr)
+{
+       trace_softirq_raise(nr);
+       or_softirq_pending(1UL << nr);
+}
+
 void open_softirq(int nr, void (*action)(struct softirq_action *))
 {
        softirq_vec[nr].action = action;
@@ -734,9 +740,7 @@ static int run_ksoftirqd(void * __bind_cpu)
        while (!kthread_should_stop()) {
                preempt_disable();
                if (!local_softirq_pending()) {
-                       preempt_enable_no_resched();
-                       schedule();
-                       preempt_disable();
+                       schedule_preempt_disabled();
                }
 
                __set_current_state(TASK_RUNNING);
@@ -751,7 +755,7 @@ static int run_ksoftirqd(void * __bind_cpu)
                        if (local_softirq_pending())
                                __do_softirq();
                        local_irq_enable();
-                       preempt_enable_no_resched();
+                       sched_preempt_enable_no_resched();
                        cond_resched();
                        preempt_disable();
                        rcu_note_context_switch((long)__bind_cpu);