]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
x86/traps: Move percpu_traps_init() into traps-init.c
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 31 Dec 2024 15:56:34 +0000 (15:56 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 6 Jan 2025 14:19:10 +0000 (14:19 +0000)
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-init.c
xen/arch/x86/traps.c

index d0b67614d521ddb8961598f99293b5639b8b4047..c8405a085e6dedeac9ee8c4f74be98362adf57f4 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 ec3fb08800465f2b7d0f147d77e5df3bdcbe1ac9..a1d80f237c1c44aa0297cf73208e3eb2a6653857 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 50dd81d2dba6b39f4932ad28a69efe206af5bfd5..b9bb76f7a5765932451e73005b4d6c5a9e8db484 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 ab00bf9a748cccf2875ad34e56120f72bff532b6..2eef8c577c0410d41aa79e2ad32964bb83acff4f 100644 (file)
@@ -3,6 +3,17 @@
  * Configuration of event handling for all CPUs.
  */
 #include <asm/idt.h>
+#include <asm/msr.h>
 #include <asm/page.h>
+#include <asm/system.h>
+#include <asm/traps.h>
 
 DEFINE_PER_CPU_READ_MOSTLY(idt_entry_t *, idt);
+
+void percpu_traps_init(void)
+{
+    subarch_percpu_traps_init();
+
+    if ( cpu_has_xen_lbr )
+        wrmsrl(MSR_IA32_DEBUGCTLMSR, IA32_DEBUGCTLMSR_LBR);
+}
index 257a15055568d2919fae39775fcbfba6f5da3e01..ce01630e9004734749317ad9ee76946cf3a68f55 100644 (file)
@@ -1862,14 +1862,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)