[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/ucode: Drop ops->match_cpu()
commit 62d7b32df7aedcbb6ca47ba136dc22c933207358 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Wed Apr 1 17:45:52 2020 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Apr 3 20:11:46 2020 +0100 x86/ucode: Drop ops->match_cpu() It turns out there are no callers of the hook(). The only callers are the local, which can easily be rearranged to use the appropriate internal helper. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/cpu/microcode/amd.c | 8 +------- xen/arch/x86/cpu/microcode/intel.c | 11 +---------- xen/arch/x86/cpu/microcode/private.h | 6 ------ 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/xen/arch/x86/cpu/microcode/amd.c b/xen/arch/x86/cpu/microcode/amd.c index d4763ea776..c9656de55d 100644 --- a/xen/arch/x86/cpu/microcode/amd.c +++ b/xen/arch/x86/cpu/microcode/amd.c @@ -188,11 +188,6 @@ static enum microcode_match_result microcode_fits( return NEW_UCODE; } -static bool match_cpu(const struct microcode_patch *patch) -{ - return patch && (microcode_fits(patch) == NEW_UCODE); -} - static void free_patch(struct microcode_patch *patch) { xfree(patch); @@ -227,7 +222,7 @@ static int apply_microcode(const struct microcode_patch *patch) if ( !patch ) return -ENOENT; - if ( !match_cpu(patch) ) + if ( microcode_fits(patch) != NEW_UCODE ) return -EINVAL; if ( check_final_patch_levels(sig) ) @@ -428,5 +423,4 @@ const struct microcode_ops amd_ucode_ops = { #endif .free_patch = free_patch, .compare_patch = compare_patch, - .match_cpu = match_cpu, }; diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c index f1e64e188b..315fca9ff2 100644 --- a/xen/arch/x86/cpu/microcode/intel.c +++ b/xen/arch/x86/cpu/microcode/intel.c @@ -245,14 +245,6 @@ static enum microcode_match_result microcode_update_match( return mc->rev > cpu_sig->rev ? NEW_UCODE : OLD_UCODE; } -static bool match_cpu(const struct microcode_patch *patch) -{ - if ( !patch ) - return false; - - return microcode_update_match(patch) == NEW_UCODE; -} - static void free_patch(struct microcode_patch *patch) { xfree(patch); @@ -281,7 +273,7 @@ static int apply_microcode(const struct microcode_patch *patch) if ( !patch ) return -ENOENT; - if ( !match_cpu(patch) ) + if ( microcode_update_match(patch) != NEW_UCODE ) return -EINVAL; /* write microcode via MSR 0x79 */ @@ -369,5 +361,4 @@ const struct microcode_ops intel_ucode_ops = { .apply_microcode = apply_microcode, .free_patch = free_patch, .compare_patch = compare_patch, - .match_cpu = match_cpu, }; diff --git a/xen/arch/x86/cpu/microcode/private.h b/xen/arch/x86/cpu/microcode/private.h index df0d0852cd..d31bcf14b1 100644 --- a/xen/arch/x86/cpu/microcode/private.h +++ b/xen/arch/x86/cpu/microcode/private.h @@ -60,12 +60,6 @@ struct microcode_ops { void (*free_patch)(struct microcode_patch *patch); /* - * Is the microcode patch applicable for the current CPU, and newer than - * the currently running patch? - */ - bool (*match_cpu)(const struct microcode_patch *patch); - - /* * Given two patches, are they both applicable to the current CPU, and is * new a higher revision than old? */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |