]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-generic/topology.h
V4L/DVB (7901): zoran: use correct type for CPU flags
[linux-2.6-omap-h63xx.git] / include / asm-generic / topology.h
index 5d9d70cd17fc41fecef6095b4322381c23a8a3f8..a6aea79bca4f369b51f0e384e15bfabcdd7e13c5 100644 (file)
 #ifndef _ASM_GENERIC_TOPOLOGY_H
 #define _ASM_GENERIC_TOPOLOGY_H
 
+#ifndef        CONFIG_NUMA
+
 /* Other architectures wishing to use this simple topology API should fill
    in the below functions as appropriate in their own <asm/topology.h> file. */
 #ifndef cpu_to_node
-#define cpu_to_node(cpu)       (0)
+#define cpu_to_node(cpu)       ((void)(cpu),0)
 #endif
 #ifndef parent_node
-#define parent_node(node)      (0)
+#define parent_node(node)      ((void)(node),0)
 #endif
 #ifndef node_to_cpumask
-#define node_to_cpumask(node)  (cpu_online_map)
+#define node_to_cpumask(node)  ((void)node, cpu_online_map)
 #endif
 #ifndef node_to_first_cpu
-#define node_to_first_cpu(node)        (0)
+#define node_to_first_cpu(node)        ((void)(node),0)
 #endif
 #ifndef pcibus_to_node
-#define pcibus_to_node(node)   (-1)
+#define pcibus_to_node(bus)    ((void)(bus), -1)
 #endif
 
 #ifndef pcibus_to_cpumask
                                )
 #endif
 
+#endif /* CONFIG_NUMA */
+
+/* returns pointer to cpumask for specified node */
+#ifndef node_to_cpumask_ptr
+
+#define        node_to_cpumask_ptr(v, node)                                    \
+               cpumask_t _##v = node_to_cpumask(node), *v = &_##v
+
+#define node_to_cpumask_ptr_next(v, node)                              \
+                         _##v = node_to_cpumask(node)
+#endif
+
 #endif /* _ASM_GENERIC_TOPOLOGY_H */