Re: [patch V2 12/37] x86/microcode/intel: Simplify and rename generic_load_microcode()

From: Borislav Petkov
Date: Mon Aug 14 2023 - 09:20:39 EST


On Sat, Aug 12, 2023 at 09:58:55PM +0200, Thomas Gleixner wrote:
> @@ -645,14 +632,12 @@ static enum ucode_state apply_microcode_
> return ret;
> }
>
> -static enum ucode_state generic_load_microcode(int cpu, struct iov_iter *iter)
> +static enum ucode_state read_ucode_intel(int cpu, struct iov_iter *iter)

I'd do this ontop:

---
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 2b49637778be..a45ecbab5137 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -632,7 +632,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
return ret;
}

-static enum ucode_state read_ucode_intel(int cpu, struct iov_iter *iter)
+static enum ucode_state parse_microcode_blobs(int cpu, struct iov_iter *iter)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
unsigned int curr_mc_size = 0, new_mc_size = 0;
@@ -758,7 +758,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device)
kvec.iov_base = (void *)firmware->data;
kvec.iov_len = firmware->size;
iov_iter_kvec(&iter, ITER_SOURCE, &kvec, 1, firmware->size);
- ret = read_ucode_intel(cpu, &iter);
+ ret = parse_microcode_blobs(cpu, &iter);

release_firmware(firmware);


--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette