smpboot.c (2612e3bbc0386368a850140a6c9b990cd496a5ec) smpboot.c (a9da6ddaef9ef7d9afd3f89e447c60e38f74bf44)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Common SMP CPU bringup/teardown functions
4 */
5#include <linux/cpu.h>
6#include <linux/err.h>
7#include <linux/smp.h>
8#include <linux/delay.h>

--- 258 unchanged lines hidden (view full) ---

267{
268 unsigned int cpu;
269
270 /* We need to destroy also the parked threads of offline cpus */
271 for_each_possible_cpu(cpu) {
272 struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
273
274 if (tsk) {
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Common SMP CPU bringup/teardown functions
4 */
5#include <linux/cpu.h>
6#include <linux/err.h>
7#include <linux/smp.h>
8#include <linux/delay.h>

--- 258 unchanged lines hidden (view full) ---

267{
268 unsigned int cpu;
269
270 /* We need to destroy also the parked threads of offline cpus */
271 for_each_possible_cpu(cpu) {
272 struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
273
274 if (tsk) {
275 kthread_stop(tsk);
276 put_task_struct(tsk);
275 kthread_stop_put(tsk);
277 *per_cpu_ptr(ht->store, cpu) = NULL;
278 }
279 }
280}
281
282/**
283 * smpboot_register_percpu_thread - Register a per_cpu thread related
284 * to hotplug

--- 43 unchanged lines hidden ---
276 *per_cpu_ptr(ht->store, cpu) = NULL;
277 }
278 }
279}
280
281/**
282 * smpboot_register_percpu_thread - Register a per_cpu thread related
283 * to hotplug

--- 43 unchanged lines hidden ---