]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - lib/cpumask.c
[PATCH] uml shouldn't do HEADERS_CHECK
[mirror_ubuntu-artful-kernel.git] / lib / cpumask.c
index ea25a034276c047ce479f50c4c2b6de38a570397..7a2a73f88d594dc73282c24e3d0304a602a10a25 100644 (file)
@@ -31,3 +31,31 @@ int highest_possible_processor_id(void)
        return highest;
 }
 EXPORT_SYMBOL(highest_possible_processor_id);
+
+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);
+
+#if MAX_NUMNODES > 1
+/*
+ * Find the highest possible node id.
+ */
+int highest_possible_node_id(void)
+{
+       unsigned int node;
+       unsigned int highest = 0;
+
+       for_each_node_mask(node, node_possible_map)
+               highest = node;
+       return highest;
+}
+EXPORT_SYMBOL(highest_possible_node_id);
+#endif