diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
commit | da733563be5a9da26fe81d9f007262d00b846e22 (patch) | |
tree | db28291df94a2043af2123911984c5c173da4e6f /arch/x86/kernel/microcode_intel.c | |
parent | 6ccbcf2cb41131f8d56ef0723bf3f7c1f8486076 (diff) | |
parent | dab78d7924598ea4031663dd10db814e2e324928 (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'arch/x86/kernel/microcode_intel.c')
-rw-r--r-- | arch/x86/kernel/microcode_intel.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c index 1a1b606d3e92..3ca42d0e43a2 100644 --- a/arch/x86/kernel/microcode_intel.c +++ b/arch/x86/kernel/microcode_intel.c | |||
@@ -161,12 +161,7 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) | |||
161 | csig->pf = 1 << ((val[1] >> 18) & 7); | 161 | csig->pf = 1 << ((val[1] >> 18) & 7); |
162 | } | 162 | } |
163 | 163 | ||
164 | wrmsr(MSR_IA32_UCODE_REV, 0, 0); | 164 | csig->rev = c->microcode; |
165 | /* see notes above for revision 1.07. Apparent chip bug */ | ||
166 | sync_core(); | ||
167 | /* get the current revision from MSR 0x8B */ | ||
168 | rdmsr(MSR_IA32_UCODE_REV, val[0], csig->rev); | ||
169 | |||
170 | pr_info("CPU%d sig=0x%x, pf=0x%x, revision=0x%x\n", | 165 | pr_info("CPU%d sig=0x%x, pf=0x%x, revision=0x%x\n", |
171 | cpu_num, csig->sig, csig->pf, csig->rev); | 166 | cpu_num, csig->sig, csig->pf, csig->rev); |
172 | 167 | ||
@@ -299,9 +294,9 @@ static int apply_microcode(int cpu) | |||
299 | struct microcode_intel *mc_intel; | 294 | struct microcode_intel *mc_intel; |
300 | struct ucode_cpu_info *uci; | 295 | struct ucode_cpu_info *uci; |
301 | unsigned int val[2]; | 296 | unsigned int val[2]; |
302 | int cpu_num; | 297 | int cpu_num = raw_smp_processor_id(); |
298 | struct cpuinfo_x86 *c = &cpu_data(cpu_num); | ||
303 | 299 | ||
304 | cpu_num = raw_smp_processor_id(); | ||
305 | uci = ucode_cpu_info + cpu; | 300 | uci = ucode_cpu_info + cpu; |
306 | mc_intel = uci->mc; | 301 | mc_intel = uci->mc; |
307 | 302 | ||
@@ -317,7 +312,7 @@ static int apply_microcode(int cpu) | |||
317 | (unsigned long) mc_intel->bits >> 16 >> 16); | 312 | (unsigned long) mc_intel->bits >> 16 >> 16); |
318 | wrmsr(MSR_IA32_UCODE_REV, 0, 0); | 313 | wrmsr(MSR_IA32_UCODE_REV, 0, 0); |
319 | 314 | ||
320 | /* see notes above for revision 1.07. Apparent chip bug */ | 315 | /* As documented in the SDM: Do a CPUID 1 here */ |
321 | sync_core(); | 316 | sync_core(); |
322 | 317 | ||
323 | /* get the current revision from MSR 0x8B */ | 318 | /* get the current revision from MSR 0x8B */ |
@@ -335,6 +330,7 @@ static int apply_microcode(int cpu) | |||
335 | (mc_intel->hdr.date >> 16) & 0xff); | 330 | (mc_intel->hdr.date >> 16) & 0xff); |
336 | 331 | ||
337 | uci->cpu_sig.rev = val[1]; | 332 | uci->cpu_sig.rev = val[1]; |
333 | c->microcode = val[1]; | ||
338 | 334 | ||
339 | return 0; | 335 | return 0; |
340 | } | 336 | } |