Skip to content

Commit

Permalink
hugetlb: add generic definition of NUMA_NO_NODE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lee Schermerhorn authored and Linus Torvalds committed Dec 15, 2009
1 parent 06808b0 commit 4e25b25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions arch/ia64/include/asm/numa.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

#include <asm/mmzone.h>

#define NUMA_NO_NODE -1

extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
extern pg_data_t *pgdat_list[MAX_NUMNODES];
Expand Down
9 changes: 7 additions & 2 deletions arch/x86/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@
# endif
#endif

/* Node not present */
#define NUMA_NO_NODE (-1)
/*
* to preserve the visibility of NUMA_NO_NODE definition,
* moved to there from here. May be used independent of
* CONFIG_NUMA.
*/
#include <linux/numa.h>

#ifdef CONFIG_NUMA
#include <linux/cpumask.h>

#include <asm/mpspec.h>

#ifdef CONFIG_X86_32
Expand Down
2 changes: 2 additions & 0 deletions include/linux/numa.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@

#define MAX_NUMNODES (1 << NODES_SHIFT)

#define NUMA_NO_NODE (-1)

#endif /* _LINUX_NUMA_H */

0 comments on commit 4e25b25

Please sign in to comment.