smp/hotplug: Differentiate the AP completion between up and down
authorPeter Zijlstra <peterz@infradead.org>
Wed, 20 Sep 2017 17:00:19 +0000 (19:00 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 25 Sep 2017 20:11:43 +0000 (22:11 +0200)
commit5ebe7742fff8be5f1359bc50f5d43fb6ff7bd060
tree7959e66651a79d2b7a3df00a1e93f391c2f0d0a7
parent5f4b55e10645b7371322c800a5ec745cab487a6c
smp/hotplug: Differentiate the AP completion between up and down

With lockdep-crossrelease we get deadlock reports that span cpu-up and
cpu-down chains. Such deadlocks cannot possibly happen because cpu-up
and cpu-down are globally serialized.

  takedown_cpu()
    irq_lock_sparse()
    wait_for_completion(&st->done)

                                cpuhp_thread_fun
                                  cpuhp_up_callback
                                    cpuhp_invoke_callback
                                      irq_affinity_online_cpu
                                        irq_local_spare()
                                        irq_unlock_sparse()
                                  complete(&st->done)

Now that we have consistent AP state, we can trivially separate the
AP completion between up and down using st->bringup.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: max.byungchul.park@gmail.com
Cc: bigeasy@linutronix.de
Cc: efault@gmx.de
Cc: rostedt@goodmis.org
Link: https://lkml.kernel.org/r/20170920170546.872472799@infradead.org
kernel/cpu.c