[PATCH 0/2] powerpc: A few misc cpumask refactors

From: Shrikanth Hegde

Date: Fri Mar 27 2026 - 02:39:25 EST


While going through the code, spotted these cpumask miscellaneous
changes. These are pure code refactors, they dont affect functionality
or performance. They just use the updated cpumask api and remove some
checks which are not necessary now.

Major one being:
cpu = cpumask_next(cpu, mask)
if (cpu >= nr_cpu_ids)
cpu = cpumask_first(mask)
Above block can be replaced by cpu = cpumask_next_wrap(cpu, mask)


Note that exact same blocks are still present in:
arch/x86/kernel/tsc_sync.c
drivers/char/random.c
drivers/net/wireguard/queueing.h
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/sfc/siena/efx_channels.c
drivers/net/ethernet/sfc/efx_channels.c
kernel/rcu/rcutorture.c

Yury, Rasmus,
Do you think it makes sense to send for the above files too?

Shrikanth Hegde (2):
powerpc: Use cpumask_next_wrap instead
powerpc: Few misc cpumask code refactors

arch/powerpc/kernel/irq.c | 5 +----
arch/powerpc/kernel/setup-common.c | 7 ++-----
arch/powerpc/mm/book3s64/hash_utils.c | 4 +---
arch/powerpc/sysdev/xive/common.c | 12 ++++--------
4 files changed, 8 insertions(+), 20 deletions(-)

--
2.47.3