On 08.11.2024 15:42, Andrew Cooper wrote: > This function is overloaded, creating complexity; 3 of 4 callers already only > want it for it's "applicable to this CPU or not" answer, and handle revision > calculations separately. > > Change it to be microcode_fits_cpu(), returning a simple boolean. The > checking of the equiv table can be simplified substantially too; A mapping > will only be inserted if it's correct for the CPU, so any nonzero equiv.sig > suffices to know that equiv.id is correct. > > Drop compare_header() too, which is simiarly overloaded, and use > compare_revisions() directly. > > Notably, this removes a path where cpu_request_microcode() inspects > currently-loaded microcode revision, just to discard the answer. > > No functional change. > > Signed-off-by: Andrew Cooper <[email protected]>
Reviewed-by: Jan Beulich <[email protected]>
