Unverified Commit 80da2afd authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3374 cpumask: cleanup nr_cpu_ids vs nr_cpumask_bits mess

Merge Pull Request from: @ci-robot 
 
PR sync from: Lu Jialin <lujialin4@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/SFJYVDZZ2MMENFD7HZX6O7KWCBB7KY5R/ 
From: Zheng Zucheng <zhengzucheng@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


-- 
2.34.1
 
https://gitee.com/openeuler/kernel/issues/I8KQBZ 
 
Link:https://gitee.com/openeuler/kernel/pulls/3374

 

Reviewed-by: default avatarLiu Chao <liuchao173@huawei.com>
Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Reviewed-by: default avatarHongchen Zhang <zhanghongchen@loongson.cn>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents db10ed58 1170e985
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment