Commit e12f0102ac81d660c9f801d0a0e10ccf4537a9de

Authored by Rusty Russell
1 parent cbe31f02f5

cpumask: Use nr_cpu_ids in seq_cpumask

Impact: cleanup, futureproof

nr_cpu_ids is the (badly named) runtime limit on possible CPU numbers;
ie. the variable version of NR_CPUS.

With the new cpumask operators, only bits less than this are defined.
So we should use it everywhere, rather than NR_CPUS.  Eventually this
will make it possible to allocate cpumasks of the minimal length at runtime.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

include/linux/seq_file.h
... ... @@ -54,7 +54,7 @@
54 54 unsigned int nr_bits);
55 55 static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask)
56 56 {
57   - return seq_bitmap(m, mask->bits, NR_CPUS);
  57 + return seq_bitmap(m, mask->bits, nr_cpu_ids);
58 58 }
59 59  
60 60 static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask)