[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] x86/CPU: re-arrange tail of early_cpu_init()



commit 11f8d55624d122320f50b8a853d3bedfaeaed271
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Sep 2 15:14:55 2026 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Sep 2 15:14:55 2026 +0200

    x86/CPU: re-arrange tail of early_cpu_init()
    
    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 <jbeulich@xxxxxxxx>
    Acked-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
---
 xen/arch/x86/cpu/common.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index 771ec2cf86..4be86e1f7b 100644
--- 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)
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.