aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/topology.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/topology.h')
-rw-r--r--include/linux/topology.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/linux/topology.h b/include/linux/topology.h
index e632d29f0544..7402c1a27c4f 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -38,11 +38,7 @@
38#endif 38#endif
39 39
40#ifndef nr_cpus_node 40#ifndef nr_cpus_node
41#define nr_cpus_node(node) \ 41#define nr_cpus_node(node) cpumask_weight(cpumask_of_node(node))
42 ({ \
43 node_to_cpumask_ptr(__tmp__, node); \
44 cpus_weight(*__tmp__); \
45 })
46#endif 42#endif
47 43
48#define for_each_node_with_cpus(node) \ 44#define for_each_node_with_cpus(node) \
@@ -193,5 +189,16 @@ int arch_update_cpu_topology(void);
193#ifndef topology_core_siblings 189#ifndef topology_core_siblings
194#define topology_core_siblings(cpu) cpumask_of_cpu(cpu) 190#define topology_core_siblings(cpu) cpumask_of_cpu(cpu)
195#endif 191#endif
192#ifndef topology_thread_cpumask
193#define topology_thread_cpumask(cpu) cpumask_of(cpu)
194#endif
195#ifndef topology_core_cpumask
196#define topology_core_cpumask(cpu) cpumask_of(cpu)
197#endif
198
199/* Returns the number of the current Node. */
200#ifndef numa_node_id
201#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
202#endif
196 203
197#endif /* _LINUX_TOPOLOGY_H */ 204#endif /* _LINUX_TOPOLOGY_H */