Loading arch/loongarch/kernel/setup.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -346,7 +346,7 @@ static void __init prefill_possible_map(void) for (; i < NR_CPUS; i++) for (; i < NR_CPUS; i++) set_cpu_possible(i, false); set_cpu_possible(i, false); nr_cpu_ids = possible; set_nr_cpu_ids(possible); } } #endif #endif Loading arch/mips/kernel/setup.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -750,7 +750,7 @@ static void __init prefill_possible_map(void) for (; i < NR_CPUS; i++) for (; i < NR_CPUS; i++) set_cpu_possible(i, false); set_cpu_possible(i, false); nr_cpu_ids = possible; set_nr_cpu_ids(possible); } } #else #else static inline void prefill_possible_map(void) {} static inline void prefill_possible_map(void) {} Loading arch/x86/kernel/smpboot.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1316,7 +1316,7 @@ static void __init smp_sanity_check(void) nr++; nr++; } } nr_cpu_ids = 8; set_nr_cpu_ids(8); } } #endif #endif Loading Loading @@ -1569,7 +1569,7 @@ __init void prefill_possible_map(void) possible = i; possible = i; } } nr_cpu_ids = possible; set_nr_cpu_ids(possible); pr_info("Allowing %d CPUs, %d hotplug CPUs\n", pr_info("Allowing %d CPUs, %d hotplug CPUs\n", possible, max_t(int, possible - num_processors, 0)); possible, max_t(int, possible - num_processors, 0)); Loading arch/x86/xen/smp_pv.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -179,7 +179,7 @@ static void __init _get_smp_config(unsigned int early) * hypercall to expand the max number of VCPUs an already * hypercall to expand the max number of VCPUs an already * running guest has. So cap it up to X. */ * running guest has. So cap it up to X. */ if (subtract) if (subtract) nr_cpu_ids = nr_cpu_ids - subtract; set_nr_cpu_ids(nr_cpu_ids - subtract); #endif #endif } } Loading include/linux/cpumask.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,11 @@ typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; #define nr_cpu_ids 1U #define nr_cpu_ids 1U #else #else extern unsigned int nr_cpu_ids; extern unsigned int nr_cpu_ids; static inline void set_nr_cpu_ids(unsigned int nr) { nr_cpu_ids = nr; } #endif #endif #ifdef CONFIG_CPUMASK_OFFSTACK #ifdef CONFIG_CPUMASK_OFFSTACK Loading Loading
arch/loongarch/kernel/setup.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -346,7 +346,7 @@ static void __init prefill_possible_map(void) for (; i < NR_CPUS; i++) for (; i < NR_CPUS; i++) set_cpu_possible(i, false); set_cpu_possible(i, false); nr_cpu_ids = possible; set_nr_cpu_ids(possible); } } #endif #endif Loading
arch/mips/kernel/setup.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -750,7 +750,7 @@ static void __init prefill_possible_map(void) for (; i < NR_CPUS; i++) for (; i < NR_CPUS; i++) set_cpu_possible(i, false); set_cpu_possible(i, false); nr_cpu_ids = possible; set_nr_cpu_ids(possible); } } #else #else static inline void prefill_possible_map(void) {} static inline void prefill_possible_map(void) {} Loading
arch/x86/kernel/smpboot.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1316,7 +1316,7 @@ static void __init smp_sanity_check(void) nr++; nr++; } } nr_cpu_ids = 8; set_nr_cpu_ids(8); } } #endif #endif Loading Loading @@ -1569,7 +1569,7 @@ __init void prefill_possible_map(void) possible = i; possible = i; } } nr_cpu_ids = possible; set_nr_cpu_ids(possible); pr_info("Allowing %d CPUs, %d hotplug CPUs\n", pr_info("Allowing %d CPUs, %d hotplug CPUs\n", possible, max_t(int, possible - num_processors, 0)); possible, max_t(int, possible - num_processors, 0)); Loading
arch/x86/xen/smp_pv.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -179,7 +179,7 @@ static void __init _get_smp_config(unsigned int early) * hypercall to expand the max number of VCPUs an already * hypercall to expand the max number of VCPUs an already * running guest has. So cap it up to X. */ * running guest has. So cap it up to X. */ if (subtract) if (subtract) nr_cpu_ids = nr_cpu_ids - subtract; set_nr_cpu_ids(nr_cpu_ids - subtract); #endif #endif } } Loading
include/linux/cpumask.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,11 @@ typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; #define nr_cpu_ids 1U #define nr_cpu_ids 1U #else #else extern unsigned int nr_cpu_ids; extern unsigned int nr_cpu_ids; static inline void set_nr_cpu_ids(unsigned int nr) { nr_cpu_ids = nr; } #endif #endif #ifdef CONFIG_CPUMASK_OFFSTACK #ifdef CONFIG_CPUMASK_OFFSTACK Loading