---
 arch/x86/include/asm/topology.h |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff -r 59b176a7b050 arch/x86/include/asm/topology.h
--- a/arch/x86/include/asm/topology.h	Thu Nov 06 23:33:23 2008 +1100
+++ b/arch/x86/include/asm/topology.h	Thu Nov 06 23:33:59 2008 +1100
@@ -61,12 +61,15 @@ static inline int cpu_to_node(int cpu)
  *
  * 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.
+ * cpumask_to_node function should be used whenever possible.
  */
 static inline cpumask_t node_to_cpumask(int node)
 {
 	return node_to_cpumask_map[node];
 }
+
+/* Returns a bitmask of CPUs on Node 'node'. */
+#define cpumask_for_node(node)		_node_to_cpumask_ptr(node)
 
 #else /* CONFIG_X86_64 */
 
@@ -213,8 +216,7 @@ static inline int node_to_first_cpu(int 
 /* Returns the number of the first CPU on Node 'node'. */
 static inline int node_to_first_cpu(int node)
 {
-	node_to_cpumask_ptr(mask, node);
-	return first_cpu(*mask);
+	return cpumask_first(cpumask_for_node(node));
 }
 #endif
 
