aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cpumask.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c
index ea25a034276c..3a67dc5ada7d 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -31,3 +31,15 @@ int highest_possible_processor_id(void)
31 return highest; 31 return highest;
32} 32}
33EXPORT_SYMBOL(highest_possible_processor_id); 33EXPORT_SYMBOL(highest_possible_processor_id);
34
35int __any_online_cpu(const cpumask_t *mask)
36{
37 int cpu;
38
39 for_each_cpu_mask(cpu, *mask) {
40 if (cpu_online(cpu))
41 break;
42 }
43 return cpu;
44}
45EXPORT_SYMBOL(__any_online_cpu);