X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Fasm-generic%2Ftopology.h;h=a6aea79bca4f369b51f0e384e15bfabcdd7e13c5;hb=a8a46a269e05190d18e4e36f51477d59bd0b29f6;hp=5d9d70cd17fc41fecef6095b4322381c23a8a3f8;hpb=a8b3e6f10f08f66ae1072efd087b30966a3654f6;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 5d9d70cd17f..a6aea79bca4 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h @@ -27,22 +27,24 @@ #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 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 @@ -52,4 +54,16 @@ ) #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 */