summaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 65e34d34ca93..3ec86bc414b7 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -481,8 +481,6 @@ static int takedown_cpu(unsigned int cpu)
481 else 481 else
482 synchronize_rcu(); 482 synchronize_rcu();
483 483
484 smpboot_park_threads(cpu);
485
486 /* 484 /*
487 * Prevent irq alloc/free while the dying cpu reorganizes the 485 * Prevent irq alloc/free while the dying cpu reorganizes the
488 * interrupt affinities. 486 * interrupt affinities.
@@ -612,38 +610,6 @@ int cpu_down(unsigned int cpu)
612EXPORT_SYMBOL(cpu_down); 610EXPORT_SYMBOL(cpu_down);
613#endif /*CONFIG_HOTPLUG_CPU*/ 611#endif /*CONFIG_HOTPLUG_CPU*/
614 612
615/*
616 * Unpark per-CPU smpboot kthreads at CPU-online time.
617 */
618static int smpboot_thread_call(struct notifier_block *nfb,
619 unsigned long action, void *hcpu)
620{
621 int cpu = (long)hcpu;
622
623 switch (action & ~CPU_TASKS_FROZEN) {
624
625 case CPU_DOWN_FAILED:
626 case CPU_ONLINE:
627 smpboot_unpark_threads(cpu);
628 break;
629
630 default:
631 break;
632 }
633
634 return NOTIFY_OK;
635}
636
637static struct notifier_block smpboot_thread_notifier = {
638 .notifier_call = smpboot_thread_call,
639 .priority = CPU_PRI_SMPBOOT,
640};
641
642void smpboot_thread_init(void)
643{
644 register_cpu_notifier(&smpboot_thread_notifier);
645}
646
647/** 613/**
648 * notify_cpu_starting(cpu) - call the CPU_STARTING notifiers 614 * notify_cpu_starting(cpu) - call the CPU_STARTING notifiers
649 * @cpu: cpu that just started 615 * @cpu: cpu that just started
@@ -959,6 +925,11 @@ static struct cpuhp_step cpuhp_bp_states[] = {
959 .startup = cpuhp_set_cpu_active, 925 .startup = cpuhp_set_cpu_active,
960 .teardown = NULL, 926 .teardown = NULL,
961 }, 927 },
928 [CPUHP_SMPBOOT_THREADS] = {
929 .name = "smpboot:threads",
930 .startup = smpboot_unpark_threads,
931 .teardown = smpboot_park_threads,
932 },
962 [CPUHP_NOTIFY_ONLINE] = { 933 [CPUHP_NOTIFY_ONLINE] = {
963 .name = "notify:online", 934 .name = "notify:online",
964 .startup = notify_online, 935 .startup = notify_online,