smp/cfd: Convert core to hotplug state machine
Install the callbacks via the state machine. They are installed at runtime so smpcfd_prepare_cpu() needs to be invoked by the boot-CPU. Signed-off-by: Richard Weinberger <richard@nod.at> [ Added the dropped CPU dying case back in. ] Signed-off-by: Richard Cochran <rcochran@linutronix.de> Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160713153337.818376366@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
committed by
Ingo Molnar
parent
6b2c28471d
commit
31487f8328
@@ -1195,6 +1195,11 @@ static struct cpuhp_step cpuhp_bp_states[] = {
|
||||
.startup = hrtimers_prepare_cpu,
|
||||
.teardown = hrtimers_dead_cpu,
|
||||
},
|
||||
[CPUHP_SMPCFD_PREPARE] = {
|
||||
.name = "SMPCFD prepare",
|
||||
.startup = smpcfd_prepare_cpu,
|
||||
.teardown = smpcfd_dead_cpu,
|
||||
},
|
||||
[CPUHP_TIMERS_DEAD] = {
|
||||
.name = "timers dead",
|
||||
.startup = NULL,
|
||||
@@ -1218,6 +1223,10 @@ static struct cpuhp_step cpuhp_bp_states[] = {
|
||||
.teardown = NULL,
|
||||
.cant_stop = true,
|
||||
},
|
||||
[CPUHP_AP_SMPCFD_DYING] = {
|
||||
.startup = NULL,
|
||||
.teardown = smpcfd_dying_cpu,
|
||||
},
|
||||
/*
|
||||
* Handled on controll processor until the plugged processor manages
|
||||
* this itself.
|
||||
|
||||
Reference in New Issue
Block a user