diff options
| author | Yury Norov [NVIDIA] <yury.norov@gmail.com> | 2025-06-22 20:00:07 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2025-06-26 23:46:34 +0200 |
| commit | 976e0e3103e463725e19a5493d02ce7b7b380663 (patch) | |
| tree | a2c26b6d890976443fb1e246d6961807e284ed25 /kernel/smp.c | |
| parent | 5f295519b42f100c735a1e8e1a70060e26f30c3f (diff) | |
smp: Use cpumask_any_but() in smp_call_function_many_cond()
smp_call_function_many_cond() opencodes cpumask_any_but().
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250623000010.10124-3-yury.norov@gmail.com
Diffstat (limited to 'kernel/smp.c')
| -rw-r--r-- | kernel/smp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index 7c8cfab0ce55..5871acf3cd45 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -807,13 +807,8 @@ static void smp_call_function_many_cond(const struct cpumask *mask, run_local = true; /* Check if we need remote execution, i.e., any CPU excluding this one. */ - cpu = cpumask_first_and(mask, cpu_online_mask); - if (cpu == this_cpu) - cpu = cpumask_next_and(cpu, mask, cpu_online_mask); - if (cpu < nr_cpu_ids) + if (cpumask_any_and_but(mask, cpu_online_mask, this_cpu) < nr_cpu_ids) { run_remote = true; - - if (run_remote) { cfd = this_cpu_ptr(&cfd_data); cpumask_and(cfd->cpumask, mask, cpu_online_mask); __cpumask_clear_cpu(this_cpu, cfd->cpumask); |
