ASoC: Optimise WM8904 output stage power control
[deliverable/linux.git] / kernel / sched.c
index 87f1f47beffe95527fa36c5b3efef16a481aba76..4508fe7048be5d91ee5a01daef3fe9de8d37b909 100644 (file)
@@ -2045,11 +2045,10 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
 
        trace_sched_migrate_task(p, new_cpu);
 
-       if (task_cpu(p) == new_cpu)
-               return;
-
-       p->se.nr_migrations++;
-       perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, 1, NULL, 0);
+       if (task_cpu(p) != new_cpu) {
+               p->se.nr_migrations++;
+               perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, 1, NULL, 0);
+       }
 
        __set_task_cpu(p, new_cpu);
 }
@@ -5531,8 +5530,11 @@ need_resched_nonpreemptible:
 
        post_schedule(rq);
 
-       if (unlikely(reacquire_kernel_lock(current) < 0))
+       if (unlikely(reacquire_kernel_lock(current) < 0)) {
+               prev = rq->curr;
+               switch_count = &prev->nivcsw;
                goto need_resched_nonpreemptible;
+       }
 
        preempt_enable_no_resched();
        if (need_resched())
This page took 0.028723 seconds and 5 git commands to generate.