[PATCH v5 1/2] x86/CPU: re-arrange tail of early_cpu_init()
Jan Beulich <[email protected]>
| Newsgroups | org.xenproject.lists.xen-devel |
|---|---|
| Message-ID | <[email protected]> |
Some early setup doesn't need re-doing after ucode load. Move the call to initialize_cpu_data() slightly up and add a conditional return point. Signed-off-by: Jan Beulich <[email protected]> --- The parameter being named "verbose" may be a little irritating for this use, yet renaming would incur extra churn. Clearly an alternative would be to split the function. I can't, however, seem to be able to think of a good name for the part that would be invoked post-ucode-loading. Maybe early_cpu_reinit(), except that calling that from early_cpu_init() then still feel somewhat odd. --- v5: New. --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -432,10 +432,18 @@ void __init early_cpu_init(bool verbose) paddr_bits -= (ebx >> 6) & 0x3f; } + initialize_cpu_data(0); + + if (!verbose) + return; + + /* + * Work which doesn't need repeating after microcode load goes below + * here. + */ + if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON))) park_offline_cpus = opt_mce; - - initialize_cpu_data(0); } void reset_cpuinfo(struct cpuinfo_x86 *c, bool keep_basic)