diff options
author | Richard Weinberger <richard@nod.at> | 2016-07-13 13:17:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-07-15 04:41:43 -0400 |
commit | 31487f8328f20fdb302430b020a5d6e8446c1971 (patch) | |
tree | 73d62b623424d059cd36633bcdf54de2e7d12240 /kernel/cpu.c | |
parent | 6b2c28471de550308784560206c3365e5179d42f (diff) |
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>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index e1017d92d308..008e2fd40cb1 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -1195,6 +1195,11 @@ static struct cpuhp_step cpuhp_bp_states[] = { | |||
1195 | .startup = hrtimers_prepare_cpu, | 1195 | .startup = hrtimers_prepare_cpu, |
1196 | .teardown = hrtimers_dead_cpu, | 1196 | .teardown = hrtimers_dead_cpu, |
1197 | }, | 1197 | }, |
1198 | [CPUHP_SMPCFD_PREPARE] = { | ||
1199 | .name = "SMPCFD prepare", | ||
1200 | .startup = smpcfd_prepare_cpu, | ||
1201 | .teardown = smpcfd_dead_cpu, | ||
1202 | }, | ||
1198 | [CPUHP_TIMERS_DEAD] = { | 1203 | [CPUHP_TIMERS_DEAD] = { |
1199 | .name = "timers dead", | 1204 | .name = "timers dead", |
1200 | .startup = NULL, | 1205 | .startup = NULL, |
@@ -1218,6 +1223,10 @@ static struct cpuhp_step cpuhp_bp_states[] = { | |||
1218 | .teardown = NULL, | 1223 | .teardown = NULL, |
1219 | .cant_stop = true, | 1224 | .cant_stop = true, |
1220 | }, | 1225 | }, |
1226 | [CPUHP_AP_SMPCFD_DYING] = { | ||
1227 | .startup = NULL, | ||
1228 | .teardown = smpcfd_dying_cpu, | ||
1229 | }, | ||
1221 | /* | 1230 | /* |
1222 | * Handled on controll processor until the plugged processor manages | 1231 | * Handled on controll processor until the plugged processor manages |
1223 | * this itself. | 1232 | * this itself. |