X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fcpumask.c;h=5f97dc25ef9c925fb68b83fecec5a7c0114ab339;hb=35780c8ea7ad5c6d5483244d5f5bf37176fda86a;hp=1ea2c184315d12bb8c5c46674c28a53ab16815a1;hpb=9654640d0af8f2de40ff3807d3695109d3463f54;p=linux-2.6 diff --git a/lib/cpumask.c b/lib/cpumask.c index 1ea2c18431..5f97dc25ef 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -15,8 +15,14 @@ int __next_cpu(int n, const cpumask_t *srcp) } EXPORT_SYMBOL(__next_cpu); -int nr_cpu_ids; -EXPORT_SYMBOL(nr_cpu_ids); +#if NR_CPUS > 64 +int __next_cpu_nr(int n, const cpumask_t *srcp) +{ + return min_t(int, nr_cpu_ids, + find_next_bit(srcp->bits, nr_cpu_ids, n+1)); +} +EXPORT_SYMBOL(__next_cpu_nr); +#endif int __any_online_cpu(const cpumask_t *mask) {