{
struct cpuinfo_x86 *c = &cpu_data(cpu);
+ csig->sig = cpuid_eax(0x00000001);
csig->rev = c->microcode;
pr_info("CPU%d: patch_level=0x%08x\n", cpu, csig->rev);
return patch_size;
}
-static u16 find_equiv_id(void)
+static u16 find_equiv_id(unsigned int cpu)
{
- unsigned int current_cpu_id, i = 0;
+ struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
+ int i = 0;
BUG_ON(equiv_cpu_table == NULL);
- current_cpu_id = cpuid_eax(0x00000001);
-
while (equiv_cpu_table[i].installed_cpu != 0) {
- if (current_cpu_id == equiv_cpu_table[i].installed_cpu)
+ if (uci->cpu_sig.sig == equiv_cpu_table[i].installed_cpu)
return equiv_cpu_table[i].equiv_cpu;
i++;
patch_size = *(u32 *)(ucode_ptr + 4);
*current_size = patch_size + SECTION_HDR_SIZE;
- equiv_cpu_id = find_equiv_id();
+ equiv_cpu_id = find_equiv_id(cpu);
if (!equiv_cpu_id)
return 0;