Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[powerpc.git] / lib / cpumask.c
index ba2f854..1ea2c18 100644 (file)
@@ -14,3 +14,18 @@ int __next_cpu(int n, const cpumask_t *srcp)
        return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
 }
 EXPORT_SYMBOL(__next_cpu);
+
+int nr_cpu_ids;
+EXPORT_SYMBOL(nr_cpu_ids);
+
+int __any_online_cpu(const cpumask_t *mask)
+{
+       int cpu;
+
+       for_each_cpu_mask(cpu, *mask) {
+               if (cpu_online(cpu))
+                       break;
+       }
+       return cpu;
+}
+EXPORT_SYMBOL(__any_online_cpu);