Skip to contentSkip to conversation

x86: move early page fault code into .init.text

PATCH New Jan Beulich 1 participant 1 message Dec 16, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: move early page fault code into .init.text

xen/arch/x86/traps.c +1 -1
@@ -1320,7 +1320,7 @@ asmlinkage void do_page_fault(struct cpu
  * during early boot (an issue was seen once, but was most likely a hardware 
  * problem).
  */
-asmlinkage void do_early_page_fault(struct cpu_user_regs *regs)
+asmlinkage void __init do_early_page_fault(struct cpu_user_regs *regs)
 {
     static int stuck;
     static unsigned long prev_eip, prev_cr2;
xen/arch/x86/x86_32/entry.S +2 -0
@@ -544,6 +544,7 @@ ENTRY(spurious_interrupt_bug)
         pushl $TRAP_spurious_int<<16
         jmp   handle_exception
 
+        .pushsection .init.text, "ax", @progbits
 ENTRY(early_page_fault)
         SAVE_ALL(1f,1f)
 1:      movl  %esp,%eax
@@ -551,6 +552,7 @@ ENTRY(early_page_fault)
         call  do_early_page_fault
         addl  $4,%esp
         jmp   restore_all_xen
+        .popsection
 
 handle_nmi_mce:
 #ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
xen/arch/x86/x86_64/entry.S +2 -0
@@ -591,11 +594,13 @@ ENTRY(double_fault)
         call  do_double_fault
         ud2
 
+        .pushsection .init.text, "ax", @progbits
 ENTRY(early_page_fault)
         SAVE_ALL
         movq  %rsp,%rdi
         call  do_early_page_fault
         jmp   restore_all_xen
+        .popsection
 
 handle_ist_exception:
         SAVE_ALL
xen/arch/x86/traps.c +1 -1
@@ -1320,7 +1320,7 @@ asmlinkage void do_page_fault(struct cpu
  * during early boot (an issue was seen once, but was most likely a hardware 
  * problem).
  */
-asmlinkage void do_early_page_fault(struct cpu_user_regs *regs)
+asmlinkage void __init do_early_page_fault(struct cpu_user_regs *regs)
 {
     static int stuck;
     static unsigned long prev_eip, prev_cr2;
xen/arch/x86/x86_32/entry.S +2 -0
@@ -544,6 +544,7 @@ ENTRY(spurious_interrupt_bug)
         pushl $TRAP_spurious_int<<16
         jmp   handle_exception
 
+        .pushsection .init.text, "ax", @progbits
 ENTRY(early_page_fault)
         SAVE_ALL(1f,1f)
 1:      movl  %esp,%eax
@@ -551,6 +552,7 @@ ENTRY(early_page_fault)
         call  do_early_page_fault
         addl  $4,%esp
         jmp   restore_all_xen
+        .popsection
 
 handle_nmi_mce:
 #ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
xen/arch/x86/x86_64/entry.S +2 -0
@@ -591,11 +594,13 @@ ENTRY(double_fault)
         call  do_double_fault
         ud2
 
+        .pushsection .init.text, "ax", @progbits
 ENTRY(early_page_fault)
         SAVE_ALL
         movq  %rsp,%rdi
         call  do_early_page_fault
         jmp   restore_all_xen
+        .popsection
 
 handle_ist_exception:
         SAVE_ALL

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel