From: Zheng Zucheng <zhengzucheng(a)huawei.com>
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.
After some testing I found build broken when SMP is on and NR_CPUS == 1.
This is addressed in a new patch #1, and in the following patch #2 that
now declares set_nr_cpu_ids in cpumask.h (was in smp.h).
Yury Norov (6):
smp: don't declare nr_cpu_ids if NR_CPUS == 1
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
powerpc/64: don't refer nr_cpu_ids in asm code when it's undefined
Zheng Zucheng (1):
config: Add FORCE_NR_CPUS to openeuler_defconfig
arch/arm64/configs/openeuler_defconfig | 1 +
arch/loongarch/kernel/setup.c | 2 +-
arch/mips/kernel/setup.c | 2 +-
arch/powerpc/kernel/head_64.S | 4 ++++
arch/x86/configs/openeuler_defconfig | 1 +
arch/x86/kernel/smpboot.c | 4 ++--
arch/x86/xen/smp_pv.c | 2 +-
include/linux/cpumask.h | 22 +++++++++++-----------
kernel/smp.c | 6 ++++--
lib/Kconfig | 9 +++++++++
10 files changed, 35 insertions(+), 18 deletions(-)
--
2.34.1