···377377}378378379379380380-static int __devinit chk_ucode_version(struct platform_device *pdev)380380+static int __cpuinit chk_ucode_version(unsigned int cpu)381381{382382- struct cpuinfo_x86 *c = &cpu_data(pdev->id);382382+ struct cpuinfo_x86 *c = &cpu_data(cpu);383383 int err;384384 u32 edx;385385···390390 */391391 if (c->x86_model == 0xe && c->x86_mask < 0xc) {392392 /* check for microcode update */393393- err = smp_call_function_single(pdev->id, get_ucode_rev_on_cpu,393393+ err = smp_call_function_single(cpu, get_ucode_rev_on_cpu,394394 &edx, 1);395395 if (err) {396396- dev_err(&pdev->dev,397397- "Cannot determine microcode revision of "398398- "CPU#%u (%d)!\n", pdev->id, err);396396+ pr_err("Cannot determine microcode revision of "397397+ "CPU#%u (%d)!\n", cpu, err);399398 return -ENODEV;400399 } else if (edx < 0x39) {401401- dev_err(&pdev->dev,402402- "Errata AE18 not fixed, update BIOS or "403403- "microcode of the CPU!\n");400400+ pr_err("Errata AE18 not fixed, update BIOS or "401401+ "microcode of the CPU!\n");404402 return -ENODEV;405403 }406404 }···506508507509 return 0;508510exit_free:511511+ pdata->core_data[attr_no] = NULL;509512 kfree(tdata);510513 return err;511514}···542543{543544 struct platform_data *pdata;544545 int err;545545-546546- /* Check the microcode version of the CPU */547547- err = chk_ucode_version(pdev);548548- if (err)549549- return err;550546551547 /* Initialize the per-package data structures */552548 pdata = kzalloc(sizeof(struct platform_data), GFP_KERNEL);···624630 }625631626632 pdev_entry->pdev = pdev;627627- pdev_entry->phys_proc_id = TO_PHYS_ID(cpu);633633+ pdev_entry->phys_proc_id = pdev->id;628634629635 list_add_tail(&pdev_entry->list, &pdev_list);630636 mutex_unlock(&pdev_list_mutex);···685691 return;686692687693 if (!pdev) {694694+ /* Check the microcode version of the CPU */695695+ if (chk_ucode_version(cpu))696696+ return;697697+688698 /*689699 * Alright, we have DTS support.690700 * We are bringing the _first_ core in this pkg