smp/hotplug: Differentiate the AP-work lockdep class between up and down
authorPeter Zijlstra <peterz@infradead.org>
Wed, 20 Sep 2017 17:00:20 +0000 (19:00 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 25 Sep 2017 20:11:43 +0000 (22:11 +0200)
commit5f4b55e10645b7371322c800a5ec745cab487a6c
tree7075811470311ce6335c6b42b0e53a0b61722e5d
parent724a86881d03ee5794148e65142e24ed3621be66
smp/hotplug: Differentiate the AP-work lockdep class 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.

  CPU0                  CPU1                    CPU2
  cpuhp_up_callbacks:   takedown_cpu:           cpuhp_thread_fun:

  cpuhp_state
                        irq_lock_sparse()
    irq_lock_sparse()
                        wait_for_completion()
                                                cpuhp_state
                                                complete()

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

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