aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/numa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/numa.c')
-rw-r--r--arch/x86/mm/numa.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index ed1daba54906..c400f3b2b93e 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -23,7 +23,6 @@
23int __initdata numa_off; 23int __initdata numa_off;
24nodemask_t numa_nodes_parsed __initdata; 24nodemask_t numa_nodes_parsed __initdata;
25 25
26#ifdef CONFIG_X86_64
27struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 26struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
28EXPORT_SYMBOL(node_data); 27EXPORT_SYMBOL(node_data);
29 28
@@ -35,7 +34,6 @@ __initdata
35 34
36static int numa_distance_cnt; 35static int numa_distance_cnt;
37static u8 *numa_distance; 36static u8 *numa_distance;
38#endif
39 37
40static __init int numa_setup(char *opt) 38static __init int numa_setup(char *opt)
41{ 39{
@@ -134,7 +132,6 @@ void __init setup_node_to_cpumask_map(void)
134 pr_debug("Node to cpumask map for %d nodes\n", nr_node_ids); 132 pr_debug("Node to cpumask map for %d nodes\n", nr_node_ids);
135} 133}
136 134
137#ifdef CONFIG_X86_64
138static int __init numa_add_memblk_to(int nid, u64 start, u64 end, 135static int __init numa_add_memblk_to(int nid, u64 start, u64 end,
139 struct numa_meminfo *mi) 136 struct numa_meminfo *mi)
140{ 137{
@@ -176,6 +173,7 @@ void __init numa_remove_memblk_from(int idx, struct numa_meminfo *mi)
176 (mi->nr_blks - idx) * sizeof(mi->blk[0])); 173 (mi->nr_blks - idx) * sizeof(mi->blk[0]));
177} 174}
178 175
176#ifdef CONFIG_X86_64
179/** 177/**
180 * numa_add_memblk - Add one numa_memblk to numa_meminfo 178 * numa_add_memblk - Add one numa_memblk to numa_meminfo
181 * @nid: NUMA node ID of the new memblk 179 * @nid: NUMA node ID of the new memblk
@@ -191,6 +189,7 @@ int __init numa_add_memblk(int nid, u64 start, u64 end)
191{ 189{
192 return numa_add_memblk_to(nid, start, end, &numa_meminfo); 190 return numa_add_memblk_to(nid, start, end, &numa_meminfo);
193} 191}
192#endif
194 193
195/* Initialize bootmem allocator for a node */ 194/* Initialize bootmem allocator for a node */
196static void __init 195static void __init
@@ -402,6 +401,7 @@ static int __init numa_alloc_distance(void)
402 return 0; 401 return 0;
403} 402}
404 403
404#ifdef CONFIG_X86_64
405/** 405/**
406 * numa_set_distance - Set NUMA distance from one NUMA to another 406 * numa_set_distance - Set NUMA distance from one NUMA to another
407 * @from: the 'from' node to set distance 407 * @from: the 'from' node to set distance
@@ -440,6 +440,7 @@ void __init numa_set_distance(int from, int to, int distance)
440 440
441 numa_distance[from * numa_distance_cnt + to] = distance; 441 numa_distance[from * numa_distance_cnt + to] = distance;
442} 442}
443#endif
443 444
444int __node_distance(int from, int to) 445int __node_distance(int from, int to)
445{ 446{
@@ -518,7 +519,6 @@ static int __init numa_register_memblks(struct numa_meminfo *mi)
518 519
519 return 0; 520 return 0;
520} 521}
521#endif
522 522
523/* 523/*
524 * There are unfortunately some poorly designed mainboards around that 524 * There are unfortunately some poorly designed mainboards around that
@@ -542,7 +542,6 @@ void __init numa_init_array(void)
542 } 542 }
543} 543}
544 544
545#ifdef CONFIG_X86_64
546static int __init numa_init(int (*init_func)(void)) 545static int __init numa_init(int (*init_func)(void))
547{ 546{
548 int i; 547 int i;
@@ -627,7 +626,6 @@ void __init x86_numa_init(void)
627 626
628 numa_init(dummy_numa_init); 627 numa_init(dummy_numa_init);
629} 628}
630#endif
631 629
632static __init int find_near_online_node(int node) 630static __init int find_near_online_node(int node)
633{ 631{