]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/microcode: Kill refresh_fw
authorBorislav Petkov <bp@suse.de>
Wed, 19 Oct 2022 17:16:20 +0000 (19:16 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 2 Nov 2022 15:45:46 +0000 (16:45 +0100)
request_microcode_fw() can always request firmware now so drop this
superfluous argument.

Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Ashok Raj <ashok.raj@intel.com>
Link: https://lore.kernel.org/r/20221028142638.28498-4-bp@alien8.de
arch/x86/include/asm/microcode.h
arch/x86/kernel/cpu/microcode/amd.c
arch/x86/kernel/cpu/microcode/core.c
arch/x86/kernel/cpu/microcode/intel.c

index 74ecc2bd6cd0f1ace97a9b5340d78d5b77893a94..d4c36fbd1d3961cd830d4b5f46935ed94b83ea43 100644 (file)
@@ -33,8 +33,7 @@ enum ucode_state {
 };
 
 struct microcode_ops {
-       enum ucode_state (*request_microcode_fw) (int cpu, struct device *,
-                                                 bool refresh_fw);
+       enum ucode_state (*request_microcode_fw) (int cpu, struct device *);
 
        void (*microcode_fini_cpu) (int cpu);
 
index e7410e98fc1f9a55a57ab3f485beb584789df9b7..b103d5e5f4478e90eb4f816c7a1916da1ad2928e 100644 (file)
@@ -891,8 +891,7 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
  *
  * These might be larger than 2K.
  */
-static enum ucode_state request_microcode_amd(int cpu, struct device *device,
-                                             bool refresh_fw)
+static enum ucode_state request_microcode_amd(int cpu, struct device *device)
 {
        char fw_name[36] = "amd-ucode/microcode_amd.bin";
        struct cpuinfo_x86 *c = &cpu_data(cpu);
@@ -901,7 +900,7 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device,
        const struct firmware *fw;
 
        /* reload ucode container only on the boot cpu */
-       if (!refresh_fw || !bsp)
+       if (!bsp)
                return UCODE_OK;
 
        if (c->x86 >= 0x15)
index 63f7678743bef7559e23ba9ac18794dfd29280d9..7c41e0132fa14549d91d2561b2fd8a2a4356821c 100644 (file)
@@ -477,7 +477,7 @@ static ssize_t reload_store(struct device *dev,
        if (ret)
                goto put;
 
-       tmp_ret = microcode_ops->request_microcode_fw(bsp, &microcode_pdev->dev, true);
+       tmp_ret = microcode_ops->request_microcode_fw(bsp, &microcode_pdev->dev);
        if (tmp_ret != UCODE_NEW)
                goto put;
 
index 1fcbd671f1dffc515672ccd2c57d5fdbf5d42436..8c35c70029bf793d4e17aaec95d31b44afba5d1b 100644 (file)
@@ -885,8 +885,7 @@ static bool is_blacklisted(unsigned int cpu)
        return false;
 }
 
-static enum ucode_state request_microcode_fw(int cpu, struct device *device,
-                                            bool refresh_fw)
+static enum ucode_state request_microcode_fw(int cpu, struct device *device)
 {
        struct cpuinfo_x86 *c = &cpu_data(cpu);
        const struct firmware *firmware;