Commit bfcb4c1b authored by James Bottomley's avatar James Bottomley Committed by Ingo Molnar

x86/voyager: fix missing cpu_index initialisation

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

Ever since

| commit 92cb7612
| 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: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b3572e36
...@@ -549,6 +549,8 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) ...@@ -549,6 +549,8 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
this_cpu->c_early_init(c); this_cpu->c_early_init(c);
validate_pat_support(c); validate_pat_support(c);
c->cpu_index = boot_cpu_id;
} }
void __init early_cpu_init(void) void __init early_cpu_init(void)
......
...@@ -420,6 +420,7 @@ void __init smp_store_cpu_info(int id) ...@@ -420,6 +420,7 @@ void __init smp_store_cpu_info(int id)
struct cpuinfo_x86 *c = &cpu_data(id); struct cpuinfo_x86 *c = &cpu_data(id);
*c = boot_cpu_data; *c = boot_cpu_data;
c->cpu_index = id;
identify_secondary_cpu(c); identify_secondary_cpu(c);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment