diff mbox series

[1/4] x86/traps: Move cpu_init() out of trap_init()

Message ID 20250317192023.568432-2-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series x86/traps: Simplify exception setup | expand

Commit Message

Andrew Cooper March 17, 2025, 7:20 p.m. UTC
cpu_init() doesn't particularly belong in trap_init().  This brings the BSP
more in line with the APs.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/setup.c | 2 ++
 xen/arch/x86/traps.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Jan Beulich March 18, 2025, 3:02 p.m. UTC | #1
On 17.03.2025 20:20, Andrew Cooper wrote:
> cpu_init() doesn't particularly belong in trap_init().  This brings the BSP
> more in line with the APs.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index bde5d75ea6ab..718297ca541a 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -2024,6 +2024,8 @@  void asmlinkage __init noreturn __start_xen(void)
 
     trap_init();
 
+    cpu_init();
+
     rcu_init();
 
     early_time_init();
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index df1155bfb673..a89f4f4f34ea 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1938,8 +1938,6 @@  void __init trap_init(void)
             l1e_from_pfn(virt_to_mfn(boot_compat_gdt), __PAGE_HYPERVISOR_RW);
 
     percpu_traps_init();
-
-    cpu_init();
 }
 
 void asm_domain_crash_synchronous(unsigned long addr)