X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fasm-generic%2Ftopology.h;h=54bbf6e04ee8f3bbd652c30254ef6553e38866c4;hb=0d62950125241a6e6db8e8f14271f098ec7a2da4;hp=5d9d70cd17fc41fecef6095b4322381c23a8a3f8;hpb=8b0ee07e108b2eefdab5bb73f33223f18926c3b2;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 5d9d70c..54bbf6e 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,17 @@ ) #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); \ + const cpumask_t *v = &_##v + +#define node_to_cpumask_ptr_next(v, node) \ + _##v = node_to_cpumask(node) +#endif + #endif /* _ASM_GENERIC_TOPOLOGY_H */