X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fcpumask.c;h=5f97dc25ef9c925fb68b83fecec5a7c0114ab339;hb=b8e6c91c74e9f0279b7c51048779b3d62da60b88;hp=1ea2c184315d12bb8c5c46674c28a53ab16815a1;hpb=9654640d0af8f2de40ff3807d3695109d3463f54;p=pandora-kernel.git diff --git a/lib/cpumask.c b/lib/cpumask.c index 1ea2c184315d..5f97dc25ef9c 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) {