Skip to content

Commit

Permalink
cpumask: Use nr_cpu_ids in seq_cpumask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rusty Russell committed Dec 29, 2008
1 parent cbe31f0 commit e12f010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/seq_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits,
unsigned int nr_bits);
static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask)
{
return seq_bitmap(m, mask->bits, NR_CPUS);
return seq_bitmap(m, mask->bits, nr_cpu_ids);
}

static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask)
Expand Down

0 comments on commit e12f010

Please sign in to comment.