summaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-08-18 08:57:16 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-09-06 12:30:19 -0400
commitee1e714b94521b0bb27b04dfd1728ec51b19d4f0 (patch)
tree3e44c2b16f45998eae6ad3f935df22929741df31 /kernel/cpu.c
parent677f6646533d701c8609b8bcb9304173c11cc194 (diff)
cpu/hotplug: Remove CPU_STARTING and CPU_DYING notifier
All users are converted to state machine, remove CPU_STARTING and the corresponding CPU_DYING. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160818125731.27256-2-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 32eef273a0b9..d14ae4438e8e 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -408,12 +408,6 @@ static int notify_online(unsigned int cpu)
408 return 0; 408 return 0;
409} 409}
410 410
411static int notify_starting(unsigned int cpu)
412{
413 cpu_notify(CPU_STARTING, cpu);
414 return 0;
415}
416
417static int bringup_wait_for_ap(unsigned int cpu) 411static int bringup_wait_for_ap(unsigned int cpu)
418{ 412{
419 struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); 413 struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
@@ -759,12 +753,6 @@ static int notify_down_prepare(unsigned int cpu)
759 return err; 753 return err;
760} 754}
761 755
762static int notify_dying(unsigned int cpu)
763{
764 cpu_notify(CPU_DYING, cpu);
765 return 0;
766}
767
768/* Take this CPU down. */ 756/* Take this CPU down. */
769static int take_cpu_down(void *_param) 757static int take_cpu_down(void *_param)
770{ 758{
@@ -823,7 +811,7 @@ static int takedown_cpu(unsigned int cpu)
823 BUG_ON(cpu_online(cpu)); 811 BUG_ON(cpu_online(cpu));
824 812
825 /* 813 /*
826 * The migration_call() CPU_DYING callback will have removed all 814 * The CPUHP_AP_SCHED_MIGRATE_DYING callback will have removed all
827 * runnable tasks from the cpu, there's only the idle task left now 815 * runnable tasks from the cpu, there's only the idle task left now
828 * that the migration thread is done doing the stop_machine thing. 816 * that the migration thread is done doing the stop_machine thing.
829 * 817 *
@@ -876,7 +864,6 @@ void cpuhp_report_idle_dead(void)
876#define notify_down_prepare NULL 864#define notify_down_prepare NULL
877#define takedown_cpu NULL 865#define takedown_cpu NULL
878#define notify_dead NULL 866#define notify_dead NULL
879#define notify_dying NULL
880#endif 867#endif
881 868
882#ifdef CONFIG_HOTPLUG_CPU 869#ifdef CONFIG_HOTPLUG_CPU
@@ -966,10 +953,9 @@ EXPORT_SYMBOL(cpu_down);
966#endif /*CONFIG_HOTPLUG_CPU*/ 953#endif /*CONFIG_HOTPLUG_CPU*/
967 954
968/** 955/**
969 * notify_cpu_starting(cpu) - call the CPU_STARTING notifiers 956 * notify_cpu_starting(cpu) - Invoke the callbacks on the starting CPU
970 * @cpu: cpu that just started 957 * @cpu: cpu that just started
971 * 958 *
972 * This function calls the cpu_chain notifiers with CPU_STARTING.
973 * It must be called by the arch code on the new cpu, before the new cpu 959 * It must be called by the arch code on the new cpu, before the new cpu
974 * enables interrupts and before the "boot" cpu returns from __cpu_up(). 960 * enables interrupts and before the "boot" cpu returns from __cpu_up().
975 */ 961 */
@@ -1365,18 +1351,6 @@ static struct cpuhp_step cpuhp_ap_states[] = {
1365 .startup.single = NULL, 1351 .startup.single = NULL,
1366 .teardown.single = rcutree_dying_cpu, 1352 .teardown.single = rcutree_dying_cpu,
1367 }, 1353 },
1368 /*
1369 * Low level startup.single/teardown notifiers. Run with interrupts
1370 * disabled. Will be removed once the notifiers are converted to
1371 * states.
1372 */
1373 [CPUHP_AP_NOTIFY_STARTING] = {
1374 .name = "notify:starting",
1375 .startup.single = notify_starting,
1376 .teardown.single = notify_dying,
1377 .skip_onerr = true,
1378 .cant_stop = true,
1379 },
1380 /* Entry state on starting. Interrupts enabled from here on. Transient 1354 /* Entry state on starting. Interrupts enabled from here on. Transient
1381 * state for synchronsization */ 1355 * state for synchronsization */
1382 [CPUHP_AP_ONLINE] = { 1356 [CPUHP_AP_ONLINE] = {