Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hugetlb: add generic definition of NUMA_NO_NODE

Move definition of NUMA_NO_NODE from ia64 and x86_64 arch specific headers
to generic header 'linux/numa.h' for use in generic code. NUMA_NO_NODE
replaces bare '-1' where it's used in this series to indicate "no node id
specified". Ultimately, it can be used to replace the -1 elsewhere where
it is used similarly.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Andi Kleen <andi@firstfloor.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Eric Whitney <eric.whitney@hp.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Lee Schermerhorn and committed by
Linus Torvalds
4e25b257 06808b08

+9 -4
-2
arch/ia64/include/asm/numa.h
··· 22 22 23 23 #include <asm/mmzone.h> 24 24 25 - #define NUMA_NO_NODE -1 26 - 27 25 extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned; 28 26 extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; 29 27 extern pg_data_t *pgdat_list[MAX_NUMNODES];
+7 -2
arch/x86/include/asm/topology.h
··· 35 35 # endif 36 36 #endif 37 37 38 - /* Node not present */ 39 - #define NUMA_NO_NODE (-1) 38 + /* 39 + * to preserve the visibility of NUMA_NO_NODE definition, 40 + * moved to there from here. May be used independent of 41 + * CONFIG_NUMA. 42 + */ 43 + #include <linux/numa.h> 40 44 41 45 #ifdef CONFIG_NUMA 42 46 #include <linux/cpumask.h> 47 + 43 48 #include <asm/mpspec.h> 44 49 45 50 #ifdef CONFIG_X86_32
+2
include/linux/numa.h
··· 10 10 11 11 #define MAX_NUMNODES (1 << NODES_SHIFT) 12 12 13 + #define NUMA_NO_NODE (-1) 14 + 13 15 #endif /* _LINUX_NUMA_H */