diff options
author | Rohit Seth <rohitseth@google.com> | 2006-06-26 07:59:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:21 -0400 |
commit | e42f94373764d825e2c0464092738f66f5d3effb (patch) | |
tree | a8b6a567e0ab70135b9c053b158b3ca2f1e22c20 /arch/x86_64/kernel/setup.c | |
parent | 495ab9c045e1b0e5c82951b762257fe1c9d81564 (diff) |
[PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
Getting phys_proc_id and cpu_core_id information to be printed at boot
time for AMD processors. Also matching the Node related boot time
information that gets printed for Intel and AMD processors for NUMA
configurations.
Signed-off-by: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r-- | arch/x86_64/kernel/setup.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 923b76fb0aa6..8ade23d7ae76 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -833,15 +833,13 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
833 | } | 833 | } |
834 | numa_set_node(cpu, node); | 834 | numa_set_node(cpu, node); |
835 | 835 | ||
836 | printk(KERN_INFO "CPU %d/%x(%d) -> Node %d -> Core %d\n", | 836 | printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node); |
837 | cpu, apicid, c->x86_max_cores, node, c->cpu_core_id); | ||
838 | #endif | 837 | #endif |
839 | #endif | 838 | #endif |
840 | } | 839 | } |
841 | 840 | ||
842 | static int __init init_amd(struct cpuinfo_x86 *c) | 841 | static void __init init_amd(struct cpuinfo_x86 *c) |
843 | { | 842 | { |
844 | int r; | ||
845 | unsigned level; | 843 | unsigned level; |
846 | 844 | ||
847 | #ifdef CONFIG_SMP | 845 | #ifdef CONFIG_SMP |
@@ -874,8 +872,8 @@ static int __init init_amd(struct cpuinfo_x86 *c) | |||
874 | if (c->x86 >= 6) | 872 | if (c->x86 >= 6) |
875 | set_bit(X86_FEATURE_FXSAVE_LEAK, &c->x86_capability); | 873 | set_bit(X86_FEATURE_FXSAVE_LEAK, &c->x86_capability); |
876 | 874 | ||
877 | r = get_model_name(c); | 875 | level = get_model_name(c); |
878 | if (!r) { | 876 | if (!level) { |
879 | switch (c->x86) { | 877 | switch (c->x86) { |
880 | case 15: | 878 | case 15: |
881 | /* Should distinguish Models here, but this is only | 879 | /* Should distinguish Models here, but this is only |
@@ -896,8 +894,6 @@ static int __init init_amd(struct cpuinfo_x86 *c) | |||
896 | 894 | ||
897 | /* Fix cpuid4 emulation for more */ | 895 | /* Fix cpuid4 emulation for more */ |
898 | num_cache_leaves = 3; | 896 | num_cache_leaves = 3; |
899 | |||
900 | return r; | ||
901 | } | 897 | } |
902 | 898 | ||
903 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | 899 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) |
@@ -909,8 +905,10 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
909 | cpuid(1, &eax, &ebx, &ecx, &edx); | 905 | cpuid(1, &eax, &ebx, &ecx, &edx); |
910 | 906 | ||
911 | 907 | ||
912 | if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY)) | 908 | if (!cpu_has(c, X86_FEATURE_HT)) |
913 | return; | 909 | return; |
910 | if (cpu_has(c, X86_FEATURE_CMP_LEGACY)) | ||
911 | goto out; | ||
914 | 912 | ||
915 | smp_num_siblings = (ebx & 0xff0000) >> 16; | 913 | smp_num_siblings = (ebx & 0xff0000) >> 16; |
916 | 914 | ||
@@ -927,9 +925,6 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
927 | index_msb = get_count_order(smp_num_siblings); | 925 | index_msb = get_count_order(smp_num_siblings); |
928 | c->phys_proc_id = phys_pkg_id(index_msb); | 926 | c->phys_proc_id = phys_pkg_id(index_msb); |
929 | 927 | ||
930 | printk(KERN_INFO "CPU: Physical Processor ID: %d\n", | ||
931 | c->phys_proc_id); | ||
932 | |||
933 | smp_num_siblings = smp_num_siblings / c->x86_max_cores; | 928 | smp_num_siblings = smp_num_siblings / c->x86_max_cores; |
934 | 929 | ||
935 | index_msb = get_count_order(smp_num_siblings) ; | 930 | index_msb = get_count_order(smp_num_siblings) ; |
@@ -938,11 +933,13 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
938 | 933 | ||
939 | c->cpu_core_id = phys_pkg_id(index_msb) & | 934 | c->cpu_core_id = phys_pkg_id(index_msb) & |
940 | ((1 << core_bits) - 1); | 935 | ((1 << core_bits) - 1); |
941 | |||
942 | if (c->x86_max_cores > 1) | ||
943 | printk(KERN_INFO "CPU: Processor Core ID: %d\n", | ||
944 | c->cpu_core_id); | ||
945 | } | 936 | } |
937 | out: | ||
938 | if ((c->x86_max_cores * smp_num_siblings) > 1) { | ||
939 | printk(KERN_INFO "CPU: Physical Processor ID: %d\n", c->phys_proc_id); | ||
940 | printk(KERN_INFO "CPU: Processor Core ID: %d\n", c->cpu_core_id); | ||
941 | } | ||
942 | |||
946 | #endif | 943 | #endif |
947 | } | 944 | } |
948 | 945 | ||
@@ -969,16 +966,17 @@ static void srat_detect_node(void) | |||
969 | #ifdef CONFIG_NUMA | 966 | #ifdef CONFIG_NUMA |
970 | unsigned node; | 967 | unsigned node; |
971 | int cpu = smp_processor_id(); | 968 | int cpu = smp_processor_id(); |
969 | int apicid = hard_smp_processor_id(); | ||
972 | 970 | ||
973 | /* Don't do the funky fallback heuristics the AMD version employs | 971 | /* Don't do the funky fallback heuristics the AMD version employs |
974 | for now. */ | 972 | for now. */ |
975 | node = apicid_to_node[hard_smp_processor_id()]; | 973 | node = apicid_to_node[apicid]; |
976 | if (node == NUMA_NO_NODE) | 974 | if (node == NUMA_NO_NODE) |
977 | node = first_node(node_online_map); | 975 | node = first_node(node_online_map); |
978 | numa_set_node(cpu, node); | 976 | numa_set_node(cpu, node); |
979 | 977 | ||
980 | if (acpi_numa > 0) | 978 | if (acpi_numa > 0) |
981 | printk(KERN_INFO "CPU %d -> Node %d\n", cpu, node); | 979 | printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node); |
982 | #endif | 980 | #endif |
983 | } | 981 | } |
984 | 982 | ||