aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2009-09-25 18:20:00 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-12 16:56:45 -0400
commit8ee2debce32412118cf8c239e0026ace56ea1425 (patch)
tree644da3b622f5266cf61e0771c23cca33943a3614 /arch/x86/kernel
parent1af5ba514f0c2f2e2af965a4ffa5e8ab269271b9 (diff)
x86: Export k8 physical topology
To eventually interleave emulated nodes over physical nodes, we need to know the physical topology of the machine without actually registering it. This does the k8 node setup in two parts: detection and registration. NUMA emulation can then used the physical topology detected to setup the address ranges of emulated nodes accordingly. If emulation isn't used, the k8 nodes are registered as normal. Two formals are added to the x86 NUMA setup functions: `acpi' and `k8'. These represent whether ACPI or K8 NUMA has been detected; both cannot be true at the same time. This specifies to the NUMA emulation code whether an underlying physical NUMA topology exists and which interface to use. This patch deals solely with separating the k8 setup path into Northbridge detection and registration steps and leaves the ACPI changes for a subsequent patch. The `acpi' formal is added here, however, to avoid touching all the header files again in the next patch. This approach also ensures emulated nodes will not span physical nodes so the true memory latency is not misrepresented. k8_get_nodes() may now be used to export the k8 physical topology of the machine for NUMA emulation. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Ankita Garg <ankita@in.ibm.com> Cc: Len Brown <len.brown@intel.com> LKML-Reference: <alpine.DEB.1.00.0909251518400.14754@chino.kir.corp.google.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/setup.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index e09f0e2c14b5..fda0032c25c6 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -106,6 +106,7 @@
106#include <asm/percpu.h> 106#include <asm/percpu.h>
107#include <asm/topology.h> 107#include <asm/topology.h>
108#include <asm/apicdef.h> 108#include <asm/apicdef.h>
109#include <asm/k8.h>
109#ifdef CONFIG_X86_64 110#ifdef CONFIG_X86_64
110#include <asm/numa_64.h> 111#include <asm/numa_64.h>
111#endif 112#endif
@@ -691,6 +692,9 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
691 692
692void __init setup_arch(char **cmdline_p) 693void __init setup_arch(char **cmdline_p)
693{ 694{
695 int acpi = 0;
696 int k8 = 0;
697
694#ifdef CONFIG_X86_32 698#ifdef CONFIG_X86_32
695 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); 699 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
696 visws_early_detect(); 700 visws_early_detect();
@@ -937,7 +941,11 @@ void __init setup_arch(char **cmdline_p)
937 acpi_numa_init(); 941 acpi_numa_init();
938#endif 942#endif
939 943
940 initmem_init(0, max_pfn); 944#ifdef CONFIG_K8_NUMA
945 k8 = !k8_numa_init(0, max_pfn);
946#endif
947
948 initmem_init(0, max_pfn, acpi, k8);
941 949
942#ifdef CONFIG_ACPI_SLEEP 950#ifdef CONFIG_ACPI_SLEEP
943 /* 951 /*