x86/voyager: fix missing cpu_index initialisation

Impact: fix /proc/cpuinfo output on x86/Voyager

Ever since

| commit 92cb7612aee39642d109b8d935ad265e602c0563
| Author: Mike Travis <travis@sgi.com>
| Date: Fri Oct 19 20:35:04 2007 +0200
|
| x86: convert cpuinfo_x86 array to a per_cpu array

We've had an extra field in cpuinfo_x86 which is cpu_index.
Unfortunately, voyager has never initialised this, although the only
noticeable impact seems to be that /proc/cpuinfo shows all zeros for
the processor ids.

Anyway, fix this by initialising the boot CPU properly and setting the
index when the secondaries update.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by James Bottomley and committed by Ingo Molnar bfcb4c1b b3572e36

+3
+2
arch/x86/kernel/cpu/common.c
··· 549 this_cpu->c_early_init(c); 550 551 validate_pat_support(c); 552 } 553 554 void __init early_cpu_init(void)
··· 549 this_cpu->c_early_init(c); 550 551 validate_pat_support(c); 552 + 553 + c->cpu_index = boot_cpu_id; 554 } 555 556 void __init early_cpu_init(void)
+1
arch/x86/mach-voyager/voyager_smp.c
··· 420 struct cpuinfo_x86 *c = &cpu_data(id); 421 422 *c = boot_cpu_data; 423 424 identify_secondary_cpu(c); 425 }
··· 420 struct cpuinfo_x86 *c = &cpu_data(id); 421 422 *c = boot_cpu_data; 423 + c->cpu_index = id; 424 425 identify_secondary_cpu(c); 426 }