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

Yury Norov posted 4 patches 3 years, 7 months ago
There is a newer version of this series
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(-)
[PATCH 0/4] cpumask: cleanup nr_cpu_ids vs nr_cpumask_bits mess
Posted by Yury Norov 3 years, 7 months ago
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