Commit 9333575f authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Greg Kroah-Hartman

cpu/hotplug: Make bringup/teardown of smp threads symmetric

commit c4de6569 upstream

The asymmetry caused a warning to trigger if the bootup was stopped in state
CPUHP_AP_ONLINE_IDLE. The warning no longer triggers as kthread_park() can
now be invoked on already or still parked threads. But there is still no
reason to have this be asymmetric.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 16fd33cd
...@@ -817,7 +817,6 @@ static int takedown_cpu(unsigned int cpu) ...@@ -817,7 +817,6 @@ static int takedown_cpu(unsigned int cpu)
/* Park the smpboot threads */ /* Park the smpboot threads */
kthread_park(per_cpu_ptr(&cpuhp_state, cpu)->thread); kthread_park(per_cpu_ptr(&cpuhp_state, cpu)->thread);
smpboot_park_threads(cpu);
/* /*
* Prevent irq alloc/free while the dying cpu reorganizes the * Prevent irq alloc/free while the dying cpu reorganizes the
...@@ -1389,7 +1388,7 @@ static struct cpuhp_step cpuhp_ap_states[] = { ...@@ -1389,7 +1388,7 @@ static struct cpuhp_step cpuhp_ap_states[] = {
[CPUHP_AP_SMPBOOT_THREADS] = { [CPUHP_AP_SMPBOOT_THREADS] = {
.name = "smpboot/threads:online", .name = "smpboot/threads:online",
.startup.single = smpboot_unpark_threads, .startup.single = smpboot_unpark_threads,
.teardown.single = NULL, .teardown.single = smpboot_park_threads,
}, },
[CPUHP_AP_PERF_ONLINE] = { [CPUHP_AP_PERF_ONLINE] = {
.name = "perf:online", .name = "perf:online",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment