diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-07-08 13:39:28 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-07-08 13:39:28 -0700 |
| commit | a63f7778f76e1cf8ed3bcb7a1d9453c9609121ad (patch) | |
| tree | 9a26f3ff67dfbd542c6eca3e5c1c7f443b1647dd /include/linux/stop_machine.h | |
| parent | c4bcc1b99b8b8acdfe673e4701a9c2acb6b8b2fb (diff) | |
| parent | 88084a3df1672e131ddc1b4e39eeacfd39864acf (diff) | |
Merge tag 'v5.19-rc5' into next
Merge with mainline to bring up the latest definition from MFD subsystem
needed for Mediatek keypad driver.
Diffstat (limited to 'include/linux/stop_machine.h')
| -rw-r--r-- | include/linux/stop_machine.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 46fb3ebdd16e..ea7a74ea7389 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h @@ -124,6 +124,22 @@ int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); */ int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); +/** + * stop_core_cpuslocked: - stop all threads on just one core + * @cpu: any cpu in the targeted core + * @fn: the function to run + * @data: the data ptr for @fn() + * + * Same as above, but instead of every CPU, only the logical CPUs of a + * single core are affected. + * + * Context: Must be called from within a cpus_read_lock() protected region. + * + * Return: 0 if all executions of @fn returned 0, any non zero return + * value if any returned non zero. + */ +int stop_core_cpuslocked(unsigned int cpu, cpu_stop_fn_t fn, void *data); + int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); #else /* CONFIG_SMP || CONFIG_HOTPLUG_CPU */ |
