microcode: Use request_firmware_direct()
authorTakashi Iwai <tiwai@suse.de>
Mon, 2 Dec 2013 14:38:17 +0000 (15:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 02:22:32 +0000 (18:22 -0800)
Use the new helper, request_firmware_direct(), for avoiding the
lengthy timeout of non-existing firmware loads.  Especially the Intel
microcode driver suffers from this problem because each CPU triggers
the f/w loading, thus it ends up taking (literally) hours with many
cores.

Tested-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/microcode_amd.c
arch/x86/kernel/microcode_intel.c

index c3d4cc972eca6baa8b470a8d80f557afd949e65b..22b3a1191ab3ee2c50de7f177149c09aa71bb44f 100644 (file)
@@ -430,7 +430,7 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device,
        if (c->x86 >= 0x15)
                snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86);
 
-       if (request_firmware(&fw, (const char *)fw_name, device)) {
+       if (request_firmware_direct(&fw, (const char *)fw_name, device)) {
                pr_debug("failed to load file %s\n", fw_name);
                goto out;
        }
index 5fb2cebf556b1e121923e645b97480ef08335d94..a276fa75d9b5d997bf3d202f0579279f11d5b82a 100644 (file)
@@ -278,7 +278,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
        sprintf(name, "intel-ucode/%02x-%02x-%02x",
                c->x86, c->x86_model, c->x86_mask);
 
-       if (request_firmware(&firmware, name, device)) {
+       if (request_firmware_direct(&firmware, name, device)) {
                pr_debug("data file %s load failed\n", name);
                return UCODE_NFOUND;
        }