[PATCH 0/4] cpumask: cleanup nr_cpu_ids vs nr_cpumask_bits mess

From: Yury Norov
Date: Mon Aug 29 2022 - 12:58:13 EST


cpumask subsystem uses nr_cpu_ids and nr_cpumask_bits interchangeably
despite that the variables have different meaning and purpose. It makes
some cpumask functions broken.

This series cleans that mess and adds new config FORCE_NR_CPUS that
allows to optimize cpumask subsystem if the number of CPUs is known
at compile-time.

Yury Norov (4):
smp: add set_nr_cpu_ids()
lib/cpumask: delete misleading comment
lib/cpumask: deprecate nr_cpumask_bits
lib/cpumask: add FORCE_NR_CPUS config option

arch/loongarch/kernel/setup.c | 2 +-
arch/mips/kernel/setup.c | 2 +-
arch/x86/kernel/smpboot.c | 4 ++--
arch/x86/xen/smp_pv.c | 2 +-
include/linux/cpumask.h | 15 +++------------
include/linux/smp.h | 9 +++++++++
kernel/smp.c | 6 ++++--
lib/Kconfig | 10 ++++++++++
8 files changed, 31 insertions(+), 19 deletions(-)

--
2.34.1