[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/ucode: Fold microcode_grab_module() into its single caller
commit 3372f8a361af24cb34ed7df3c373ae556259dd22 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Oct 25 17:50:37 2024 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Tue Nov 5 23:42:30 2024 +0000 x86/ucode: Fold microcode_grab_module() into its single caller No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> --- xen/arch/x86/cpu/microcode/core.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode/core.c index f1e002a55d..512671f622 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -205,19 +205,6 @@ static void __init microcode_scan_module(struct boot_info *bi) } } -static void __init microcode_grab_module(struct boot_info *bi) -{ - if ( ucode_mod_idx < 0 ) - ucode_mod_idx += bi->nr_modules; - if ( ucode_mod_idx <= 0 || ucode_mod_idx >= bi->nr_modules || - !__test_and_clear_bit(ucode_mod_idx, bi->module_map) ) - goto scan; - ucode_mod = *bi->mods[ucode_mod_idx].mod; -scan: - if ( ucode_scan ) - microcode_scan_module(bi); -} - static struct microcode_ops __ro_after_init ucode_ops; static DEFINE_SPINLOCK(microcode_mutex); @@ -853,7 +840,15 @@ static int __init early_microcode_load(struct boot_info *bi) size_t size; struct microcode_patch *patch; - microcode_grab_module(bi); + if ( ucode_mod_idx < 0 ) + ucode_mod_idx += bi->nr_modules; + if ( ucode_mod_idx <= 0 || ucode_mod_idx >= bi->nr_modules || + !__test_and_clear_bit(ucode_mod_idx, bi->module_map) ) + goto scan; + ucode_mod = *bi->mods[ucode_mod_idx].mod; + scan: + if ( ucode_scan ) + microcode_scan_module(bi); if ( !ucode_mod.mod_end && !ucode_blob.size ) return 0; -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |