aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2010-12-22 20:23:51 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2010-12-23 18:27:14 -0500
commitf51bf3073a145a5b3263fd882c52d6ec04b687da (patch)
treec9e07ebc957cbb768c4e750b1a67640e0ad81118 /arch/x86/include
parent4e76f4e67a106ed827ca721b4c8b622047cd2f6d (diff)
x86, numa: Fake apicid and pxm mappings for NUMA emulation
This patch adds the equivalent of acpi_fake_nodes() for AMD Northbridge platforms. The goal is to fake the apicid-to-node mappings for NUMA emulation so the physical topology of the machine is correctly maintained within the kernel. This change also fakes proximity domains for both ACPI and k8 code so the physical distance between emulated nodes is maintained via node_distance(). This exports the correct distances via /sys/devices/system/node/.../distance based on the underlying topology. A new helper function, fake_physnodes(), is introduced to correctly invoke the correct NUMA code to fake these two mappings based on the system type. If there is no underlying NUMA configuration, all cpus are mapped to node 0 for local distance. Since acpi_fake_nodes() is no longer called with CONFIG_ACPI_NUMA, it's prototype can be removed from the header file for such a configuration. Signed-off-by: David Rientjes <rientjes@google.com> LKML-Reference: <alpine.DEB.2.00.1012221701360.3701@chino.kir.corp.google.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/acpi.h5
-rw-r--r--arch/x86/include/asm/amd_nb.h1
2 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index b326fa99db57..8288daf72dc9 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -193,11 +193,6 @@ extern int acpi_scan_nodes(unsigned long start, unsigned long end);
193extern void acpi_fake_nodes(const struct bootnode *fake_nodes, 193extern void acpi_fake_nodes(const struct bootnode *fake_nodes,
194 int num_nodes); 194 int num_nodes);
195#endif 195#endif
196#else
197static inline void acpi_fake_nodes(const struct bootnode *fake_nodes,
198 int num_nodes)
199{
200}
201#endif /* CONFIG_ACPI_NUMA */ 196#endif /* CONFIG_ACPI_NUMA */
202 197
203#define acpi_unlazy_tlb(x) leave_mm(x) 198#define acpi_unlazy_tlb(x) leave_mm(x)
diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
index 9c16cde63f04..8f6192c1592c 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -13,6 +13,7 @@ extern int amd_numa_init(unsigned long start_pfn, unsigned long end_pfn);
13extern int amd_scan_nodes(void); 13extern int amd_scan_nodes(void);
14 14
15#ifdef CONFIG_NUMA_EMU 15#ifdef CONFIG_NUMA_EMU
16extern void amd_fake_nodes(const struct bootnode *nodes, int nr_nodes);
16extern int amd_get_nodes(struct bootnode *nodes); 17extern int amd_get_nodes(struct bootnode *nodes);
17#endif 18#endif
18 19