diff options
author | Andi Kleen <ak@suse.de> | 2005-09-12 12:49:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 13:49:56 -0400 |
commit | df0cc26b1b7f88f46307eea50a7469f0b58132d9 (patch) | |
tree | c4b4c7c38ca7833cabcd06c2929f617446939d76 /arch | |
parent | 3f098c2605bdf50176b26f4fa724e9b9c99e5242 (diff) |
[PATCH] x86-64: Use SRAT data on Intel systems too.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/setup.c | 21 |
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 | ||
945 | static 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 | |||
945 | static void __cpuinit init_intel(struct cpuinfo_x86 *c) | 964 | static 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 | ||
965 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) | 986 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) |