x86: move early page fault code into .init.text
authorKeir Fraser <keir@xen.org>
Thu, 16 Dec 2010 18:37:30 +0000 (18:37 +0000)
committerKeir Fraser <keir@xen.org>
Thu, 16 Dec 2010 18:37:30 +0000 (18:37 +0000)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/traps.c
xen/arch/x86/x86_32/entry.S
xen/arch/x86/x86_64/entry.S

index 2eedfc37691d2668adab301cd11d184dba006875..f0843d5e194d536d8a5c3e000763074fca85451e 100644 (file)
@@ -1317,7 +1317,7 @@ asmlinkage void do_page_fault(struct cpu_user_regs *regs)
  * 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;
index 60642d3f6a6d7f5440180d5887f8d242f37fd5ae..4d34b90dd5bb5ec500ff682a6790286b4382a847 100644 (file)
@@ -549,6 +549,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
@@ -556,6 +557,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
index 27effbdae7eaa1e994c4904a7f8909a567ab9ca5..7c5fe92786352c873a5d5aa7b3345a0113ff669a 100644 (file)
@@ -591,11 +591,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