[PATCH 0/5] cpumask: Use cpumask_intersects* APIs where applicable
From: Shrikanth Hegde
Date: Wed Nov 11 2026 - 03:00:44 EST
It was observed while working on cpumask_intersects_and, check like
below could use it instead.
if (cpumask_first_and_and() < nr_cpu_ids)
While there, did check the code for any such similar patterns of
cpumask_any_and, cpumask_first_and and explicit loops where
cpu found by these APIs are not being used. All those callsites
instead can simply use cpumask_intersects.
Note that few more places can use similar change. But, I have left
them as is.
drivers/net/ethernet/sfc/efx_channels.c+370
drivers/net/ethernet/sfc/siena/efx_channels.c+371
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c+153
Also, these patches can combined into three patches if that is
easier for review/merge. I have kept it separate since they belong
to different subsystems.
Shrikanth Hegde (5):
sched/rt: cpupri_find: Use cpumask_intersects where applicable
cpu/hotplug: Use cpumask_intersects where applicable
perf: Use cpumask_intersects where applicable
cpuidle: Use cpumask_intersects_and where applicable
arch_topology: Use cpumask_intersects where applicable
drivers/base/arch_topology.c | 9 +--------
drivers/cpuidle/coupled.c | 4 ++--
kernel/cpu.c | 3 +--
kernel/events/core.c | 7 ++-----
kernel/sched/cpupri.c | 2 +-
5 files changed, 7 insertions(+), 18 deletions(-)
--
2.52.0