aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/topology.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-03-13 23:43:37 +1030
committerIngo Molnar <mingo@elte.hu>2009-03-13 14:35:31 +0100
commit082edb7bf443eb8eda15b482d16ad9dd8137ad24 (patch)
tree167d8c2ca193af9161aded5f368f300981c59535 /include/linux/topology.h
parentcpumask: convert node_to_cpumask_map[] to cpumask_var_t (diff)
downloadlinux-dev-082edb7bf443eb8eda15b482d16ad9dd8137ad24.tar.xz
linux-dev-082edb7bf443eb8eda15b482d16ad9dd8137ad24.zip
numa, cpumask: move numa_node_id default implementation to topology.h
Impact: cleanup, potential bugfix Not sure what changed to expose this, but clearly that numa_node_id() doesn't belong in mmzone.h (the inline in gfp.h is probably overkill, too). In file included from include/linux/topology.h:34, from arch/x86/mm/numa.c:2: /home/rusty/patches-cpumask/linux-2.6/arch/x86/include/asm/topology.h:64:1: warning: "numa_node_id" redefined In file included from include/linux/topology.h:32, from arch/x86/mm/numa.c:2: include/linux/mmzone.h:770:1: warning: this is the location of the previous definition Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Mike Travis <travis@sgi.com> LKML-Reference: <200903132343.37661.rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/topology.h')
-rw-r--r--include/linux/topology.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 16b7d6896ce9..7402c1a27c4f 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -196,4 +196,9 @@ int arch_update_cpu_topology(void);
#define topology_core_cpumask(cpu) cpumask_of(cpu)
#endif
+/* Returns the number of the current Node. */
+#ifndef numa_node_id
+#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
+#endif
+
#endif /* _LINUX_TOPOLOGY_H */