]> xenbits.xensource.com Git - xen.git/commitdiff
x86/traps: Move percpu_traps_init() into traps-setup.c
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 31 Dec 2024 15:56:34 +0000 (15:56 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Mar 2025 11:52:39 +0000 (11:52 +0000)
Move the declaration from asm/system.h into asm/traps.h.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/power.c
xen/arch/x86/include/asm/system.h
xen/arch/x86/include/asm/traps.h
xen/arch/x86/setup.c
xen/arch/x86/smpboot.c
xen/arch/x86/traps-setup.c
xen/arch/x86/traps.c

index fe70257864e170140dd3c9d6d3eadef1d40eee18..3196a33b1918210c7cd9ad584f11cc4af2a133a6 100644 (file)
@@ -31,6 +31,7 @@
 #include <asm/spec_ctrl.h>
 #include <asm/tboot.h>
 #include <asm/trampoline.h>
+#include <asm/traps.h>
 
 #include <public/platform.h>
 
index 73cb16ca68d648f47bbb30a1b7b95dd903df28d0..73364056c702a9cd7258e2757ae6f398636ae3bd 100644 (file)
@@ -266,7 +266,6 @@ static inline int local_irq_is_enabled(void)
 void trap_init(void);
 void init_idt_traps(void);
 void load_system_tables(void);
-void percpu_traps_init(void);
 void subarch_percpu_traps_init(void);
 
 #endif
index 01ef362edc8cf9db46b1063ea9eb87611fef6bac..825f7441c86e62fb941d480b5d8e59cf5edc06ce 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef ASM_TRAP_H
 #define ASM_TRAP_H
 
+void percpu_traps_init(void);
+
 const char *vector_name(unsigned int vec);
 
 #endif /* ASM_TRAP_H */
index 5daa70fc0fadd3493a6584aa5e4d1700ee5d3ec2..67463482dcf5e597d34feada00cc555aac88a5d4 100644 (file)
@@ -56,6 +56,7 @@
 #include <asm/spec_ctrl.h>
 #include <asm/tboot.h>
 #include <asm/trampoline.h>
+#include <asm/traps.h>
 
 #include <xsm/xsm.h>
 
index b63a9ce13e0a9f765f0603d9c9b9b7a3a9461b30..54207e6d8830f1a3c5d104b6b2f4b70eb86e071f 100644 (file)
@@ -41,6 +41,7 @@
 #include <asm/tboot.h>
 #include <asm/time.h>
 #include <asm/trampoline.h>
+#include <asm/traps.h>
 
 uint32_t __ro_after_init trampoline_phys;
 enum ap_boot_method __read_mostly ap_boot_method = AP_BOOT_NORMAL;
index 3ee28319584db780078dc466c31323a541bd5ffe..fa78a35a7ebfb5bb7a98dfadf3662dfc53603c66 100644 (file)
@@ -3,5 +3,20 @@
  * Configuration of event handling for all CPUs.
  */
 #include <asm/idt.h>
+#include <asm/msr.h>
+#include <asm/system.h>
+#include <asm/traps.h>
 
 DEFINE_PER_CPU_READ_MOSTLY(idt_entry_t *, idt);
+
+/*
+ * Set up per-CPU linkage registers for exception, interrupt and syscall
+ * handling.
+ */
+void percpu_traps_init(void)
+{
+    subarch_percpu_traps_init();
+
+    if ( cpu_has_xen_lbr )
+        wrmsrl(MSR_IA32_DEBUGCTLMSR, IA32_DEBUGCTLMSR_LBR);
+}
index a89f4f4f34ea03e69a27032d810a33aa97aac377..29d7e4123f90d4e240d9581d25e1410ceb548727 100644 (file)
@@ -1864,14 +1864,6 @@ void asmlinkage do_entry_CP(struct cpu_user_regs *regs)
     panic("CONTROL-FLOW PROTECTION FAULT: #CP[%04x] %s\n", ec, err);
 }
 
-void percpu_traps_init(void)
-{
-    subarch_percpu_traps_init();
-
-    if ( cpu_has_xen_lbr )
-        wrmsrl(MSR_IA32_DEBUGCTLMSR, IA32_DEBUGCTLMSR_LBR);
-}
-
 void nocall entry_PF(void);
 
 void __init init_idt_traps(void)