]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86/voyager: fix missing cpu_index initialisation
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 30 Oct 2008 21:13:37 +0000 (16:13 -0500)
committerIngo Molnar <mingo@elte.hu>
Thu, 30 Oct 2008 23:19:37 +0000 (00:19 +0100)
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>
arch/x86/kernel/cpu/common.c
arch/x86/mach-voyager/voyager_smp.c

index 93e9393ea64a4cbe8703742ac8699e8e122a73d3..da8f15ac7a6d3853efae3285f22874af22131238 100644 (file)
@@ -549,6 +549,8 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
                this_cpu->c_early_init(c);
 
        validate_pat_support(c);
+
+       c->cpu_index = boot_cpu_id;
 }
 
 void __init early_cpu_init(void)
index 01285af5782c2029d4c879b4ac25d3e9381712ac..7f4c6af143515af7633e79ddfbe65d6ab6dc98fb 100644 (file)
@@ -420,6 +420,7 @@ void __init smp_store_cpu_info(int id)
        struct cpuinfo_x86 *c = &cpu_data(id);
 
        *c = boot_cpu_data;
+       c->cpu_index = id;
 
        identify_secondary_cpu(c);
 }