Merge tag 'v4.17-rc5' into locking/core, to pick up fixes
authorIngo Molnar <mingo@kernel.org>
Tue, 15 May 2018 06:10:50 +0000 (08:10 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 15 May 2018 06:10:50 +0000 (08:10 +0200)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
1  2 
MAINTAINERS
kernel/stop_machine.c

diff --cc MAINTAINERS
Simple merge
@@@ -78,14 -81,16 +81,16 @@@ static bool cpu_stop_queue_work(unsigne
        unsigned long flags;
        bool enabled;
  
 -      spin_lock_irqsave(&stopper->lock, flags);
 +      raw_spin_lock_irqsave(&stopper->lock, flags);
        enabled = stopper->enabled;
        if (enabled)
-               __cpu_stop_queue_work(stopper, work);
+               __cpu_stop_queue_work(stopper, work, &wakeq);
        else if (work->done)
                cpu_stop_signal_done(work->done);
 -      spin_unlock_irqrestore(&stopper->lock, flags);
 +      raw_spin_unlock_irqrestore(&stopper->lock, flags);
  
+       wake_up_q(&wakeq);
        return enabled;
  }
  
@@@ -229,10 -234,11 +234,11 @@@ static int cpu_stop_queue_two_works(in
  {
        struct cpu_stopper *stopper1 = per_cpu_ptr(&cpu_stopper, cpu1);
        struct cpu_stopper *stopper2 = per_cpu_ptr(&cpu_stopper, cpu2);
+       DEFINE_WAKE_Q(wakeq);
        int err;
  retry:
 -      spin_lock_irq(&stopper1->lock);
 -      spin_lock_nested(&stopper2->lock, SINGLE_DEPTH_NESTING);
 +      raw_spin_lock_irq(&stopper1->lock);
 +      raw_spin_lock_nested(&stopper2->lock, SINGLE_DEPTH_NESTING);
  
        err = -ENOENT;
        if (!stopper1->enabled || !stopper2->enabled)
                        goto unlock;
  
        err = 0;
-       __cpu_stop_queue_work(stopper1, work1);
-       __cpu_stop_queue_work(stopper2, work2);
+       __cpu_stop_queue_work(stopper1, work1, &wakeq);
+       __cpu_stop_queue_work(stopper2, work2, &wakeq);
  unlock:
 -      spin_unlock(&stopper2->lock);
 -      spin_unlock_irq(&stopper1->lock);
 +      raw_spin_unlock(&stopper2->lock);
 +      raw_spin_unlock_irq(&stopper1->lock);
  
        if (unlikely(err == -EDEADLK)) {
                while (stop_cpus_in_progress)