aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/Kconfig3
-rw-r--r--arch/ia64/kernel/smpboot.c4
-rw-r--r--include/asm-generic/topology.h20
-rw-r--r--include/linux/topology.h4
4 files changed, 20 insertions, 11 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 8711d13cd79f..ba22849ee3ec 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -499,8 +499,7 @@ config USE_PERCPU_NUMA_NODE_ID
499 depends on NUMA 499 depends on NUMA
500 500
501config HAVE_MEMORYLESS_NODES 501config HAVE_MEMORYLESS_NODES
502 def_bool y 502 def_bool NUMA
503 depends on NUMA
504 503
505config ARCH_PROC_KCORE_TEXT 504config ARCH_PROC_KCORE_TEXT
506 def_bool y 505 def_bool y
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 99dcc85193c9..1d85d8cfaa7d 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -390,13 +390,11 @@ smp_callin (void)
390 390
391 fix_b0_for_bsp(); 391 fix_b0_for_bsp();
392 392
393#ifdef CONFIG_NUMA
394 /* 393 /*
395 * numa_node_id() works after this. 394 * numa_node_id() works after this.
396 */ 395 */
397 set_numa_node(cpu_to_node_map[cpuid]); 396 set_numa_node(cpu_to_node_map[cpuid]);
398 set_numa_mem(local_memory_node(cpu_to_node_map[cpuid])); 397 set_numa_mem(local_memory_node(cpu_to_node_map[cpuid]));
399#endif
400 398
401 ipi_call_lock_irq(); 399 ipi_call_lock_irq();
402 spin_lock(&vector_lock); 400 spin_lock(&vector_lock);
@@ -640,9 +638,7 @@ void __devinit smp_prepare_boot_cpu(void)
640{ 638{
641 cpu_set(smp_processor_id(), cpu_online_map); 639 cpu_set(smp_processor_id(), cpu_online_map);
642 cpu_set(smp_processor_id(), cpu_callin_map); 640 cpu_set(smp_processor_id(), cpu_callin_map);
643#ifdef CONFIG_NUMA
644 set_numa_node(cpu_to_node_map[smp_processor_id()]); 641 set_numa_node(cpu_to_node_map[smp_processor_id()]);
645#endif
646 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 642 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
647 paravirt_post_smp_prepare_boot_cpu(); 643 paravirt_post_smp_prepare_boot_cpu();
648} 644}
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index fd60700503c8..fc824e2828f3 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -5,7 +5,7 @@
5 * 5 *
6 * Copyright (C) 2002, IBM Corp. 6 * Copyright (C) 2002, IBM Corp.
7 * 7 *
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 11 * it under the terms of the GNU General Public License as published by
@@ -34,9 +34,16 @@
34#ifndef cpu_to_node 34#ifndef cpu_to_node
35#define cpu_to_node(cpu) ((void)(cpu),0) 35#define cpu_to_node(cpu) ((void)(cpu),0)
36#endif 36#endif
37#ifndef set_numa_node
38#define set_numa_node(node)
39#endif
40#ifndef set_cpu_numa_node
41#define set_cpu_numa_node(cpu, node)
42#endif
37#ifndef cpu_to_mem 43#ifndef cpu_to_mem
38#define cpu_to_mem(cpu) ((void)(cpu),0) 44#define cpu_to_mem(cpu) ((void)(cpu),0)
39#endif 45#endif
46
40#ifndef parent_node 47#ifndef parent_node
41#define parent_node(node) ((void)(node),0) 48#define parent_node(node) ((void)(node),0)
42#endif 49#endif
@@ -55,4 +62,15 @@
55 62
56#endif /* CONFIG_NUMA */ 63#endif /* CONFIG_NUMA */
57 64
65#if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
66
67#ifndef set_numa_mem
68#define set_numa_mem(node)
69#endif
70#ifndef set_cpu_numa_mem
71#define set_cpu_numa_mem(cpu, node)
72#endif
73
74#endif /* !CONFIG_NUMA || !CONFIG_HAVE_MEMORYLESS_NODES */
75
58#endif /* _ASM_GENERIC_TOPOLOGY_H */ 76#endif /* _ASM_GENERIC_TOPOLOGY_H */
diff --git a/include/linux/topology.h b/include/linux/topology.h
index b572e432d2f3..64e084ff5e5c 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -292,10 +292,6 @@ static inline void set_cpu_numa_mem(int cpu, int node)
292 292
293#else /* !CONFIG_HAVE_MEMORYLESS_NODES */ 293#else /* !CONFIG_HAVE_MEMORYLESS_NODES */
294 294
295static inline void set_numa_mem(int node) {}
296
297static inline void set_cpu_numa_mem(int cpu, int node) {}
298
299#ifndef numa_mem_id 295#ifndef numa_mem_id
300/* Returns the number of the nearest Node with memory */ 296/* Returns the number of the nearest Node with memory */
301static inline int numa_mem_id(void) 297static inline int numa_mem_id(void)