Re: [Patch V1 5/7] x86/microcode/intel: Prepare the print_ucode_rev to simply take a rev to print
From: Thomas Gleixner
Date: Fri Dec 02 2022 - 14:23:37 EST
On Tue, Nov 29 2022 at 13:08, Ashok Raj wrote:
> Instead of passing a struct ucode_cpu_info, just pass the rev to print.
>
> Next patch will permit printing old and new revisions after an early
> update. A subsequent patch will print a message when early loading fails.
>
> struct ucode_cpu_info is always the current version in the CPU. When
> loading fails this is the old rev, when its successfully applied its the
> new rev. That makes the code bit ugly to read.
>
> Remove the struct ucode_cpu_info parameter from print_ucode() and let
> the caller to pass in the revision number to print.
Back to word salad mode?
Subject: x86/microcode/intel: Use a plain revision argument for print_ucode_rev()
print_ucode_rev() takes a struct ucode_cpu_info argument. The sole
purpose of it is to print the microcode revision.
The only available ucode_cpu_info describes always the currently
loaded microcode version. After a microcode update this is on success
the new version or on failure the original version.
Subsequent changes need to print both the original and the new
version, but the original version will be cached in a plain
integer, which makes the code inconsistent.
Replace the struct ucode_cpu_info argument with a plain integer which
contains the revision number and adjust the call sites accordingly.
No functional change.
Hmm?
Other than that.
Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>