[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>

authored by Andi Kleen and committed by Linus Torvalds 2e664aa2 77a75333

+10 -7
+10 -7
arch/i386/kernel/cpu/common.c
··· 204 205 /* Do minimum CPU detection early. 206 Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment. 207 - The others are not touched to avoid unwanted side effects. */ 208 static void __init early_cpu_detect(void) 209 { 210 struct cpuinfo_x86 *c = &boot_cpu_data; ··· 239 if (cap0 & (1<<19)) 240 c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8; 241 } 242 - 243 - early_intel_workaround(c); 244 - 245 - #ifdef CONFIG_X86_HT 246 - phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; 247 - #endif 248 } 249 250 void __devinit generic_identify(struct cpuinfo_x86 * c) ··· 286 get_model_name(c); /* Default name */ 287 } 288 } 289 } 290 291 static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
··· 204 205 /* Do minimum CPU detection early. 206 Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment. 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. */ 211 static void __init early_cpu_detect(void) 212 { 213 struct cpuinfo_x86 *c = &boot_cpu_data; ··· 236 if (cap0 & (1<<19)) 237 c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8; 238 } 239 } 240 241 void __devinit generic_identify(struct cpuinfo_x86 * c) ··· 289 get_model_name(c); /* Default name */ 290 } 291 } 292 + 293 + early_intel_workaround(c); 294 + 295 + #ifdef CONFIG_X86_HT 296 + phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; 297 + #endif 298 } 299 300 static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)