diff options
| author | Frederic Weisbecker <[email protected]> | 2024-09-26 22:49:07 +0000 |
|---|---|---|
| committer | Frederic Weisbecker <[email protected]> | 2025-01-08 17:15:03 +0000 |
| commit | b04e317b522630b46f78ee62ecbdc5734e8d43de (patch) | |
| tree | 8becba4f285448112cfe2de10b86a6c1b67e0cd8 /drivers/cpufreq/cppc_cpufreq.c | |
| parent | kthread: Unify kthread_create_on_cpu() and kthread_create_worker_on_cpu() aut... (diff) | |
| download | kernel-b04e317b522630b46f78ee62ecbdc5734e8d43de.tar.gz kernel-b04e317b522630b46f78ee62ecbdc5734e8d43de.zip | |
treewide: Introduce kthread_run_worker[_on_cpu]()
kthread_create() creates a kthread without running it yet. kthread_run()
creates a kthread and runs it.
On the other hand, kthread_create_worker() creates a kthread worker and
runs it.
This difference in behaviours is confusing. Also there is no way to
create a kthread worker and affine it using kthread_bind_mask() or
kthread_affine_preferred() before starting it.
Consolidate the behaviours and introduce kthread_run_worker[_on_cpu]()
that behaves just like kthread_run(). kthread_create_worker[_on_cpu]()
will now only create a kthread worker without starting it.
Signed-off-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Diffstat (limited to 'drivers/cpufreq/cppc_cpufreq.c')
| -rw-r--r-- | drivers/cpufreq/cppc_cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index bd8f75accfa0..2486a6c5256a 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -225,7 +225,7 @@ static void __init cppc_freq_invariance_init(void) if (fie_disabled) return; - kworker_fie = kthread_create_worker(0, "cppc_fie"); + kworker_fie = kthread_run_worker(0, "cppc_fie"); if (IS_ERR(kworker_fie)) { pr_warn("%s: failed to create kworker_fie: %ld\n", __func__, PTR_ERR(kworker_fie)); |
