aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r--arch/x86_64/kernel/setup.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index df55a63f8866..869770da2933 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -942,6 +942,25 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
942 return 1; 942 return 1;
943} 943}
944 944
945static void srat_detect_node(void)
946{
947#ifdef CONFIG_NUMA
948 unsigned apicid, node;
949 int cpu = smp_processor_id();
950
951 /* Don't do the funky fallback heuristics the AMD version employs
952 for now. */
953 apicid = phys_proc_id[cpu];
954 node = apicid_to_node[apicid];
955 if (node == NUMA_NO_NODE)
956 node = 0;
957 cpu_to_node[cpu] = node;
958
959 if (acpi_numa > 0)
960 printk(KERN_INFO "CPU %d -> Node %d\n", cpu, node);
961#endif
962}
963
945static void __cpuinit init_intel(struct cpuinfo_x86 *c) 964static void __cpuinit init_intel(struct cpuinfo_x86 *c)
946{ 965{
947 /* Cache sizes */ 966 /* Cache sizes */
@@ -960,6 +979,8 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
960 if (c->x86 >= 15) 979 if (c->x86 >= 15)
961 set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); 980 set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
962 c->x86_num_cores = intel_num_cpu_cores(c); 981 c->x86_num_cores = intel_num_cpu_cores(c);
982
983 srat_detect_node();
963} 984}
964 985
965static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) 986static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)