diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-02-09 07:13:45 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-02-09 07:13:45 -0500 |
| commit | 3c3d7cb1db4af176dab843f22ea092a4ef1eb989 (patch) | |
| tree | 9c1b2951432ed10d0654a8e13cbe57b51260d06b /arch/x86/kernel/cpu/microcode | |
| parent | 0e9f2204cfa6d79abe3e525ddf7c4ab5792cc751 (diff) | |
| parent | 494479038d97f1b9f76fc633a360a681acdf035c (diff) | |
Merge branch 'linus' into perf/core
Refresh the branch to a v3.14-rc base before queueing up new devel patches.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/microcode')
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/amd.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/amd_early.c | 43 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/intel.c | 2 |
3 files changed, 31 insertions, 16 deletions
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index 4a6ff747aaad..8fffd845e22b 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c | |||
| @@ -433,7 +433,7 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device, | |||
| 433 | if (c->x86 >= 0x15) | 433 | if (c->x86 >= 0x15) |
| 434 | snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86); | 434 | snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86); |
| 435 | 435 | ||
| 436 | if (request_firmware(&fw, (const char *)fw_name, device)) { | 436 | if (request_firmware_direct(&fw, (const char *)fw_name, device)) { |
| 437 | pr_debug("failed to load file %s\n", fw_name); | 437 | pr_debug("failed to load file %s\n", fw_name); |
| 438 | goto out; | 438 | goto out; |
| 439 | } | 439 | } |
diff --git a/arch/x86/kernel/cpu/microcode/amd_early.c b/arch/x86/kernel/cpu/microcode/amd_early.c index 8384c0fa206f..617a9e284245 100644 --- a/arch/x86/kernel/cpu/microcode/amd_early.c +++ b/arch/x86/kernel/cpu/microcode/amd_early.c | |||
| @@ -285,6 +285,15 @@ static void __init collect_cpu_sig_on_bsp(void *arg) | |||
| 285 | 285 | ||
| 286 | uci->cpu_sig.sig = cpuid_eax(0x00000001); | 286 | uci->cpu_sig.sig = cpuid_eax(0x00000001); |
| 287 | } | 287 | } |
| 288 | |||
| 289 | static void __init get_bsp_sig(void) | ||
| 290 | { | ||
| 291 | unsigned int bsp = boot_cpu_data.cpu_index; | ||
| 292 | struct ucode_cpu_info *uci = ucode_cpu_info + bsp; | ||
| 293 | |||
| 294 | if (!uci->cpu_sig.sig) | ||
| 295 | smp_call_function_single(bsp, collect_cpu_sig_on_bsp, NULL, 1); | ||
| 296 | } | ||
| 288 | #else | 297 | #else |
| 289 | void load_ucode_amd_ap(void) | 298 | void load_ucode_amd_ap(void) |
| 290 | { | 299 | { |
| @@ -337,31 +346,37 @@ void load_ucode_amd_ap(void) | |||
| 337 | 346 | ||
| 338 | int __init save_microcode_in_initrd_amd(void) | 347 | int __init save_microcode_in_initrd_amd(void) |
| 339 | { | 348 | { |
| 349 | unsigned long cont; | ||
| 340 | enum ucode_state ret; | 350 | enum ucode_state ret; |
| 341 | u32 eax; | 351 | u32 eax; |
| 342 | 352 | ||
| 343 | #ifdef CONFIG_X86_32 | 353 | if (!container) |
| 344 | unsigned int bsp = boot_cpu_data.cpu_index; | 354 | return -EINVAL; |
| 345 | struct ucode_cpu_info *uci = ucode_cpu_info + bsp; | ||
| 346 | |||
| 347 | if (!uci->cpu_sig.sig) | ||
| 348 | smp_call_function_single(bsp, collect_cpu_sig_on_bsp, NULL, 1); | ||
| 349 | 355 | ||
| 356 | #ifdef CONFIG_X86_32 | ||
| 357 | get_bsp_sig(); | ||
| 358 | cont = (unsigned long)container; | ||
| 359 | #else | ||
| 350 | /* | 360 | /* |
| 351 | * Take into account the fact that the ramdisk might get relocated | 361 | * We need the physical address of the container for both bitness since |
| 352 | * and therefore we need to recompute the container's position in | 362 | * boot_params.hdr.ramdisk_image is a physical address. |
| 353 | * virtual memory space. | ||
| 354 | */ | 363 | */ |
| 355 | container = (u8 *)(__va((u32)relocated_ramdisk) + | 364 | cont = __pa(container); |
| 356 | ((u32)container - boot_params.hdr.ramdisk_image)); | ||
| 357 | #endif | 365 | #endif |
| 366 | |||
| 367 | /* | ||
| 368 | * Take into account the fact that the ramdisk might get relocated and | ||
| 369 | * therefore we need to recompute the container's position in virtual | ||
| 370 | * memory space. | ||
| 371 | */ | ||
| 372 | if (relocated_ramdisk) | ||
| 373 | container = (u8 *)(__va(relocated_ramdisk) + | ||
| 374 | (cont - boot_params.hdr.ramdisk_image)); | ||
| 375 | |||
| 358 | if (ucode_new_rev) | 376 | if (ucode_new_rev) |
| 359 | pr_info("microcode: updated early to new patch_level=0x%08x\n", | 377 | pr_info("microcode: updated early to new patch_level=0x%08x\n", |
| 360 | ucode_new_rev); | 378 | ucode_new_rev); |
| 361 | 379 | ||
| 362 | if (!container) | ||
| 363 | return -EINVAL; | ||
| 364 | |||
| 365 | eax = cpuid_eax(0x00000001); | 380 | eax = cpuid_eax(0x00000001); |
| 366 | eax = ((eax >> 8) & 0xf) + ((eax >> 20) & 0xff); | 381 | eax = ((eax >> 8) & 0xf) + ((eax >> 20) & 0xff); |
| 367 | 382 | ||
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 5fb2cebf556b..a276fa75d9b5 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c | |||
| @@ -278,7 +278,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device, | |||
| 278 | sprintf(name, "intel-ucode/%02x-%02x-%02x", | 278 | sprintf(name, "intel-ucode/%02x-%02x-%02x", |
| 279 | c->x86, c->x86_model, c->x86_mask); | 279 | c->x86, c->x86_model, c->x86_mask); |
| 280 | 280 | ||
| 281 | if (request_firmware(&firmware, name, device)) { | 281 | if (request_firmware_direct(&firmware, name, device)) { |
| 282 | pr_debug("data file %s load failed\n", name); | 282 | pr_debug("data file %s load failed\n", name); |
| 283 | return UCODE_NFOUND; | 283 | return UCODE_NFOUND; |
| 284 | } | 284 | } |
