x86: add check for node passed to node_to_cpumask, v3
[linux-2.6-block.git] / include / asm-x86 / topology.h
index 1f97758de4ab70b4ebbe4ae443132eaa11c547c7..98e5f17ea85634003407dc0c363faf25147c4225 100644 (file)
@@ -57,7 +57,12 @@ static inline int cpu_to_node(int cpu)
 }
 #define early_cpu_to_node(cpu) cpu_to_node(cpu)
 
-/* Returns a bitmask of CPUs on Node 'node'. */
+/* Returns a bitmask of CPUs on Node 'node'.
+ *
+ * Side note: this function creates the returned cpumask on the stack
+ * so with a high NR_CPUS count, excessive stack space is used.  The
+ * node_to_cpumask_ptr function should be used whenever possible.
+ */
 static inline cpumask_t node_to_cpumask(int node)
 {
        return node_to_cpumask_map[node];