!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:Liu Chao <liuchao173@huawei.com> Reviewed-by:
Zhang Jianhua <chris.zjh@huawei.com> Reviewed-by:
Hongchen Zhang <zhanghongchen@loongson.cn> Reviewed-by:
Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by:
Jialin Zhang <zhangjialin11@huawei.com>
Loading
Please sign in to comment