diff options
author | Yury Norov <yury.norov@gmail.com> | 2022-09-05 16:08:17 -0700 |
---|---|---|
committer | Yury Norov <yury.norov@gmail.com> | 2022-09-19 17:51:53 -0700 |
commit | 38bef8e57f2149acd2c910a98f57dd6291d2e0ec (patch) | |
tree | c4a62158f1967502fa801529406a5a04624048f2 /include/linux/cpumask.h | |
parent | 53fc190cc6771c5494d782210334d4ebb50c7103 (diff) |
smp: add set_nr_cpu_ids()
In preparation to support compile-time nr_cpu_ids, add a setter for
the variable.
This is a no-op for all arches.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r-- | include/linux/cpumask.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index e8ad12b5b9d2..24763997894d 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -39,6 +39,11 @@ typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; #define nr_cpu_ids 1U #else extern unsigned int nr_cpu_ids; + +static inline void set_nr_cpu_ids(unsigned int nr) +{ + nr_cpu_ids = nr; +} #endif #ifdef CONFIG_CPUMASK_OFFSTACK |