|
@@ -504,6 +504,7 @@ static enum ucode_state apply_microcode_amd(int cpu)
|
|
|
struct microcode_amd *mc_amd;
|
|
|
struct ucode_cpu_info *uci;
|
|
|
struct ucode_patch *p;
|
|
|
+ enum ucode_state ret;
|
|
|
u32 rev, dummy;
|
|
|
|
|
|
BUG_ON(raw_smp_processor_id() != cpu);
|
|
@@ -521,9 +522,8 @@ static enum ucode_state apply_microcode_amd(int cpu)
|
|
|
|
|
|
/* need to apply patch? */
|
|
|
if (rev >= mc_amd->hdr.patch_id) {
|
|
|
- c->microcode = rev;
|
|
|
- uci->cpu_sig.rev = rev;
|
|
|
- return UCODE_OK;
|
|
|
+ ret = UCODE_OK;
|
|
|
+ goto out;
|
|
|
}
|
|
|
|
|
|
if (__apply_microcode_amd(mc_amd)) {
|
|
@@ -531,17 +531,21 @@ static enum ucode_state apply_microcode_amd(int cpu)
|
|
|
cpu, mc_amd->hdr.patch_id);
|
|
|
return UCODE_ERROR;
|
|
|
}
|
|
|
- pr_info("CPU%d: new patch_level=0x%08x\n", cpu,
|
|
|
- mc_amd->hdr.patch_id);
|
|
|
|
|
|
- uci->cpu_sig.rev = mc_amd->hdr.patch_id;
|
|
|
- c->microcode = mc_amd->hdr.patch_id;
|
|
|
+ rev = mc_amd->hdr.patch_id;
|
|
|
+ ret = UCODE_UPDATED;
|
|
|
+
|
|
|
+ pr_info("CPU%d: new patch_level=0x%08x\n", cpu, rev);
|
|
|
+
|
|
|
+out:
|
|
|
+ uci->cpu_sig.rev = rev;
|
|
|
+ c->microcode = rev;
|
|
|
|
|
|
/* Update boot_cpu_data's revision too, if we're on the BSP: */
|
|
|
if (c->cpu_index == boot_cpu_data.cpu_index)
|
|
|
- boot_cpu_data.microcode = mc_amd->hdr.patch_id;
|
|
|
+ boot_cpu_data.microcode = rev;
|
|
|
|
|
|
- return UCODE_UPDATED;
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
static int install_equiv_cpu_table(const u8 *buf)
|