aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-02-16 11:11:09 -0500
committerTejun Heo <tj@kernel.org>2011-02-16 11:11:09 -0500
commitac7136b611ee8f8bd6231ce2e1dbdd31ae3d39bc (patch)
tree41f6809ba694a723b521573c2e8d34c652c31281 /arch/x86/include
parent4697bdcc945c094d2c8a4876a24faeaf31a283e0 (diff)
x86-64, NUMA: Implement generic node distance handling
Node distance either used direct node comparison, ACPI PXM comparison or ACPI SLIT table lookup. This patch implements generic node distance handling. NUMA init methods can call numa_set_distance() to set distance between nodes and the common __node_distance() implementation will report the set distance. Due to the way NUMA emulation is implemented, the generic node distance handling is used only when emulation is not used. Later patches will update NUMA emulation to use the generic distance mechanism. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Brian Gerst <brgerst@gmail.com> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Shaohui Zheng <shaohui.zheng@intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/acpi.h1
-rw-r--r--arch/x86/include/asm/numa_64.h1
-rw-r--r--arch/x86/include/asm/topology.h2
3 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index cfa3d5c3144a..9c9fe1b0bc4e 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -190,6 +190,7 @@ extern int x86_acpi_numa_init(void);
190#ifdef CONFIG_NUMA_EMU 190#ifdef CONFIG_NUMA_EMU
191extern void acpi_fake_nodes(const struct bootnode *fake_nodes, 191extern void acpi_fake_nodes(const struct bootnode *fake_nodes,
192 int num_nodes); 192 int num_nodes);
193extern int acpi_emu_node_distance(int a, int b);
193#endif 194#endif
194#endif /* CONFIG_ACPI_NUMA */ 195#endif /* CONFIG_ACPI_NUMA */
195 196
diff --git a/arch/x86/include/asm/numa_64.h b/arch/x86/include/asm/numa_64.h
index f42710bd3e73..5361c5947986 100644
--- a/arch/x86/include/asm/numa_64.h
+++ b/arch/x86/include/asm/numa_64.h
@@ -28,6 +28,7 @@ extern nodemask_t numa_nodes_parsed __initdata;
28 28
29extern int __cpuinit numa_cpu_node(int cpu); 29extern int __cpuinit numa_cpu_node(int cpu);
30extern int __init numa_add_memblk(int nodeid, u64 start, u64 end); 30extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
31extern void __init numa_set_distance(int from, int to, int distance);
31 32
32#ifdef CONFIG_NUMA_EMU 33#ifdef CONFIG_NUMA_EMU
33#define FAKE_NODE_MIN_SIZE ((u64)32 << 20) 34#define FAKE_NODE_MIN_SIZE ((u64)32 << 20)
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index b101c17861f5..910a7084f7f2 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -138,7 +138,7 @@ extern unsigned long node_remap_size[];
138 .balance_interval = 1, \ 138 .balance_interval = 1, \
139} 139}
140 140
141#ifdef CONFIG_X86_64_ACPI_NUMA 141#ifdef CONFIG_X86_64
142extern int __node_distance(int, int); 142extern int __node_distance(int, int);
143#define node_distance(a, b) __node_distance(a, b) 143#define node_distance(a, b) __node_distance(a, b)
144#endif 144#endif