diff options
author | Andi Kleen <ak@suse.de> | 2006-01-11 16:46:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:05:02 -0500 |
commit | 2e664aa2bad56b0bb52cf9cb9d14c9b575b437bb (patch) | |
tree | fc7173b4c61e9adb69e4523680f7d790cf90c351 /arch/i386 | |
parent | 77a75333a3d16b830ccf47cf51d944655b015363 (diff) |
[PATCH] i386: Move phys_proc_id/early intel workaround to correct function.
early_cpu_detect only runs on the BP, but this code needs to run
on all CPUs.
Looks like a mismerge somewhere. Also add a warning comment.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/cpu/common.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 170400879f44..15aee26ec2b6 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -204,7 +204,10 @@ static int __devinit have_cpuid_p(void) | |||
204 | 204 | ||
205 | /* Do minimum CPU detection early. | 205 | /* Do minimum CPU detection early. |
206 | Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment. | 206 | Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment. |
207 | The others are not touched to avoid unwanted side effects. */ | 207 | The others are not touched to avoid unwanted side effects. |
208 | |||
209 | WARNING: this function is only called on the BP. Don't add code here | ||
210 | that is supposed to run on all CPUs. */ | ||
208 | static void __init early_cpu_detect(void) | 211 | static void __init early_cpu_detect(void) |
209 | { | 212 | { |
210 | struct cpuinfo_x86 *c = &boot_cpu_data; | 213 | struct cpuinfo_x86 *c = &boot_cpu_data; |
@@ -236,12 +239,6 @@ static void __init early_cpu_detect(void) | |||
236 | if (cap0 & (1<<19)) | 239 | if (cap0 & (1<<19)) |
237 | c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8; | 240 | c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8; |
238 | } | 241 | } |
239 | |||
240 | early_intel_workaround(c); | ||
241 | |||
242 | #ifdef CONFIG_X86_HT | ||
243 | phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; | ||
244 | #endif | ||
245 | } | 242 | } |
246 | 243 | ||
247 | void __devinit generic_identify(struct cpuinfo_x86 * c) | 244 | void __devinit generic_identify(struct cpuinfo_x86 * c) |
@@ -289,6 +286,12 @@ void __devinit generic_identify(struct cpuinfo_x86 * c) | |||
289 | get_model_name(c); /* Default name */ | 286 | get_model_name(c); /* Default name */ |
290 | } | 287 | } |
291 | } | 288 | } |
289 | |||
290 | early_intel_workaround(c); | ||
291 | |||
292 | #ifdef CONFIG_X86_HT | ||
293 | phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; | ||
294 | #endif | ||
292 | } | 295 | } |
293 | 296 | ||
294 | static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) | 297 | static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) |