Skip to content

Commit 4e25b25

Browse files
Lee Schermerhorntorvalds
authored andcommitted
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 <[email protected]> Acked-by: David Rientjes <[email protected]> Acked-by: Mel Gorman <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Nishanth Aravamudan <[email protected]> Cc: Adam Litke <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Eric Whitney <[email protected]> Cc: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 06808b0 commit 4e25b25

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

arch/ia64/include/asm/numa.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
#include <asm/mmzone.h>
2424

25-
#define NUMA_NO_NODE -1
26-
2725
extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
2826
extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
2927
extern pg_data_t *pgdat_list[MAX_NUMNODES];

arch/x86/include/asm/topology.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@
3535
# endif
3636
#endif
3737

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>
4044

4145
#ifdef CONFIG_NUMA
4246
#include <linux/cpumask.h>
47+
4348
#include <asm/mpspec.h>
4449

4550
#ifdef CONFIG_X86_32

include/linux/numa.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010

1111
#define MAX_NUMNODES (1 << NODES_SHIFT)
1212

13+
#define NUMA_NO_NODE (-1)
14+
1315
#endif /* _LINUX_NUMA_H */

0 commit comments

Comments
 (0)