[PATCH] x86_64/ia64 : Fix compilation error for node_to_first_cpu

Fixes a compiler error in node_to_first_cpu, __ffs expects unsigned long as
a parameter; instead cpumask_t was being passed. The macro
node_to_first_cpu was not yet used in x86_64 and ia64 arches, and so we never
hit this. This patch replaces __ffs with first_cpu macro, similar to other
arches.

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Ravikiran G Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Ravikiran G Thirumalai and committed by Linus Torvalds c660439b 1224b375

+2 -2
+1 -1
include/asm-ia64/topology.h
··· 38 /* 39 * Returns the number of the first CPU on Node 'node'. 40 */ 41 - #define node_to_first_cpu(node) (__ffs(node_to_cpumask(node))) 42 43 /* 44 * Determines the node for a given pci bus
··· 38 /* 39 * Returns the number of the first CPU on Node 'node'. 40 */ 41 + #define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node))) 42 43 /* 44 * Determines the node for a given pci bus
+1 -1
include/asm-x86_64/topology.h
··· 23 24 #define cpu_to_node(cpu) (cpu_to_node[cpu]) 25 #define parent_node(node) (node) 26 - #define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) 27 #define node_to_cpumask(node) (node_to_cpumask[node]) 28 #define pcibus_to_node(bus) ((long)(bus->sysdata)) 29 #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus));
··· 23 24 #define cpu_to_node(cpu) (cpu_to_node[cpu]) 25 #define parent_node(node) (node) 26 + #define node_to_first_cpu(node) (first_cpu(node_to_cpumask[node])) 27 #define node_to_cpumask(node) (node_to_cpumask[node]) 28 #define pcibus_to_node(bus) ((long)(bus->sysdata)) 29 #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus));