Re: [PATCH 2/4] seq_file: Add seq_cpumask_list(),seq_nodemask_list()

From: Andrew Morton
Date: Thu Oct 16 2008 - 15:58:48 EST

On Sun, 12 Oct 2008 17:29:25 +0800
Lai Jiangshan <laijs@xxxxxxxxxxxxxx> wrote:

> +static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask)
> +{
> + return seq_bitmap_list(m, mask->bits, NR_CPUS);
> +}

Is it possible to avoid using NR_CPUS? In some situations it'd be much
more efficient to use the runtime-determined max possible cpu index.

But I don't immediately recall how to get at that number.
num_possible_cpus() assumes that there are no holes in the CPU
identifier list.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at