diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 18:06:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 18:06:00 -0400 |
commit | 60812a4a99b796d894d2522dc63cb0fafc3be25e (patch) | |
tree | bbf3a441b71e3b9b670d91652094114852272db8 /arch/x86/kernel/setup_64.c | |
parent | b04cde34cf1d006dfaf8523640f3a18bbb15ebaa (diff) | |
parent | 92cb7612aee39642d109b8d935ad265e602c0563 (diff) |
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86
* ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86: (33 commits)
x86: convert cpuinfo_x86 array to a per_cpu array
x86: introduce frame_pointer() and stack_pointer()
x86 & generic: change to __builtin_prefetch()
i386: do not BUG_ON() when MSR is unknown
x86: acpi use cpu_physical_id
x86: convert cpu_llc_id to be a per cpu variable
x86: convert cpu_to_apicid to be a per cpu variable
i386: introduce "used_vectors" bitmap which can be used to reserve vectors.
x86: use raw locks during oopses
x86: honor _PAGE_PSE bit on page walks
i386: do cpuid_device_create() in CPU_UP_PREPARE instead of CPU_ONLINE.
x86: implement missing x86_64 function smp_call_function_mask()
x86: use descriptor's functions instead of inline assembly
i386: consolidate show_regs and show_registers for i386
i386: make callgraph use dump_trace() on i386/x86_64
x86: enable iommu_merge by default
i386: i386 add AMD64 Barcelona PMU MSR definitions to msr.h
x86: Unify i386 and x86-64 early quirks
x86: enable HPET on ICH3 and ICH4
x86: force enable HPET on VT8235/8237 chipsets
...
Manually fix trivial conflict with task pid container helper changes in
arch/x86/kernel/process_32.c
Diffstat (limited to 'arch/x86/kernel/setup_64.c')
-rw-r--r-- | arch/x86/kernel/setup_64.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index cdcba6975226..31322d42eaae 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -302,6 +302,11 @@ void __init setup_arch(char **cmdline_p) | |||
302 | 302 | ||
303 | dmi_scan_machine(); | 303 | dmi_scan_machine(); |
304 | 304 | ||
305 | #ifdef CONFIG_SMP | ||
306 | /* setup to use the static apicid table during kernel startup */ | ||
307 | x86_cpu_to_apicid_ptr = (void *)&x86_cpu_to_apicid_init; | ||
308 | #endif | ||
309 | |||
305 | #ifdef CONFIG_ACPI | 310 | #ifdef CONFIG_ACPI |
306 | /* | 311 | /* |
307 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). | 312 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). |
@@ -554,7 +559,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
554 | but in the same order as the HT nodeids. | 559 | but in the same order as the HT nodeids. |
555 | If that doesn't result in a usable node fall back to the | 560 | If that doesn't result in a usable node fall back to the |
556 | path for the previous case. */ | 561 | path for the previous case. */ |
557 | int ht_nodeid = apicid - (cpu_data[0].phys_proc_id << bits); | 562 | int ht_nodeid = apicid - (cpu_data(0).phys_proc_id << bits); |
558 | if (ht_nodeid >= 0 && | 563 | if (ht_nodeid >= 0 && |
559 | apicid_to_node[ht_nodeid] != NUMA_NO_NODE) | 564 | apicid_to_node[ht_nodeid] != NUMA_NO_NODE) |
560 | node = apicid_to_node[ht_nodeid]; | 565 | node = apicid_to_node[ht_nodeid]; |
@@ -878,6 +883,7 @@ void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
878 | 883 | ||
879 | #ifdef CONFIG_SMP | 884 | #ifdef CONFIG_SMP |
880 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; | 885 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; |
886 | c->cpu_index = 0; | ||
881 | #endif | 887 | #endif |
882 | } | 888 | } |
883 | 889 | ||
@@ -984,6 +990,7 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) | |||
984 | static int show_cpuinfo(struct seq_file *m, void *v) | 990 | static int show_cpuinfo(struct seq_file *m, void *v) |
985 | { | 991 | { |
986 | struct cpuinfo_x86 *c = v; | 992 | struct cpuinfo_x86 *c = v; |
993 | int cpu = 0; | ||
987 | 994 | ||
988 | /* | 995 | /* |
989 | * These flag bits must match the definitions in <asm/cpufeature.h>. | 996 | * These flag bits must match the definitions in <asm/cpufeature.h>. |
@@ -1062,8 +1069,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1062 | 1069 | ||
1063 | 1070 | ||
1064 | #ifdef CONFIG_SMP | 1071 | #ifdef CONFIG_SMP |
1065 | if (!cpu_online(c-cpu_data)) | 1072 | if (!cpu_online(c->cpu_index)) |
1066 | return 0; | 1073 | return 0; |
1074 | cpu = c->cpu_index; | ||
1067 | #endif | 1075 | #endif |
1068 | 1076 | ||
1069 | seq_printf(m,"processor\t: %u\n" | 1077 | seq_printf(m,"processor\t: %u\n" |
@@ -1071,7 +1079,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1071 | "cpu family\t: %d\n" | 1079 | "cpu family\t: %d\n" |
1072 | "model\t\t: %d\n" | 1080 | "model\t\t: %d\n" |
1073 | "model name\t: %s\n", | 1081 | "model name\t: %s\n", |
1074 | (unsigned)(c-cpu_data), | 1082 | (unsigned)cpu, |
1075 | c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", | 1083 | c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", |
1076 | c->x86, | 1084 | c->x86, |
1077 | (int)c->x86_model, | 1085 | (int)c->x86_model, |
@@ -1083,7 +1091,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1083 | seq_printf(m, "stepping\t: unknown\n"); | 1091 | seq_printf(m, "stepping\t: unknown\n"); |
1084 | 1092 | ||
1085 | if (cpu_has(c,X86_FEATURE_TSC)) { | 1093 | if (cpu_has(c,X86_FEATURE_TSC)) { |
1086 | unsigned int freq = cpufreq_quick_get((unsigned)(c-cpu_data)); | 1094 | unsigned int freq = cpufreq_quick_get((unsigned)cpu); |
1087 | if (!freq) | 1095 | if (!freq) |
1088 | freq = cpu_khz; | 1096 | freq = cpu_khz; |
1089 | seq_printf(m, "cpu MHz\t\t: %u.%03u\n", | 1097 | seq_printf(m, "cpu MHz\t\t: %u.%03u\n", |
@@ -1096,7 +1104,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1096 | 1104 | ||
1097 | #ifdef CONFIG_SMP | 1105 | #ifdef CONFIG_SMP |
1098 | if (smp_num_siblings * c->x86_max_cores > 1) { | 1106 | if (smp_num_siblings * c->x86_max_cores > 1) { |
1099 | int cpu = c - cpu_data; | ||
1100 | seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); | 1107 | seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); |
1101 | seq_printf(m, "siblings\t: %d\n", | 1108 | seq_printf(m, "siblings\t: %d\n", |
1102 | cpus_weight(per_cpu(cpu_core_map, cpu))); | 1109 | cpus_weight(per_cpu(cpu_core_map, cpu))); |
@@ -1154,12 +1161,16 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1154 | 1161 | ||
1155 | static void *c_start(struct seq_file *m, loff_t *pos) | 1162 | static void *c_start(struct seq_file *m, loff_t *pos) |
1156 | { | 1163 | { |
1157 | return *pos < NR_CPUS ? cpu_data + *pos : NULL; | 1164 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
1165 | *pos = first_cpu(cpu_possible_map); | ||
1166 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | ||
1167 | return &cpu_data(*pos); | ||
1168 | return NULL; | ||
1158 | } | 1169 | } |
1159 | 1170 | ||
1160 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 1171 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
1161 | { | 1172 | { |
1162 | ++*pos; | 1173 | *pos = next_cpu(*pos, cpu_possible_map); |
1163 | return c_start(m, pos); | 1174 | return c_start(m, pos); |
1164 | } | 1175 | } |
1165 | 1176 | ||