Commit 082edb7bf443eb8eda15b482d16ad9dd8137ad24

Authored by Rusty Russell
Committed by Ingo Molnar
1 parent 0b966252d9

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>

Showing 3 changed files with 6 additions and 6 deletions Side-by-side Diff

... ... @@ -4,6 +4,7 @@
4 4 #include <linux/mmzone.h>
5 5 #include <linux/stddef.h>
6 6 #include <linux/linkage.h>
  7 +#include <linux/topology.h>
7 8  
8 9 struct vm_area_struct;
9 10  
include/linux/mmzone.h
... ... @@ -764,12 +764,6 @@
764 764 extern char numa_zonelist_order[];
765 765 #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */
766 766  
767   -#include <linux/topology.h>
768   -/* Returns the number of the current Node. */
769   -#ifndef numa_node_id
770   -#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
771   -#endif
772   -
773 767 #ifndef CONFIG_NEED_MULTIPLE_NODES
774 768  
775 769 extern struct pglist_data contig_page_data;
include/linux/topology.h
... ... @@ -196,5 +196,10 @@
196 196 #define topology_core_cpumask(cpu) cpumask_of(cpu)
197 197 #endif
198 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
  203 +
199 204 #endif /* _LINUX_TOPOLOGY_H */