- patches.arch/x86_mce_intel_decode_physical_address.patch:
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / kernel / entry_32.S
index 3a4068a..213f319 100644 (file)
@@ -53,6 +53,7 @@
 #include <asm/processor-flags.h>
 #include <asm/ftrace.h>
 #include <asm/irq_vectors.h>
+#include <asm/cpufeature.h>
 
 /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this.  */
 #include <linux/elf-em.h>
@@ -401,7 +402,7 @@ ENTRY(ia32_sysenter_target)
        CFI_SIGNAL_FRAME
        CFI_DEF_CFA esp, 0
        CFI_REGISTER esp, ebp
-       movl SYSENTER_stack_sp0(%esp),%esp
+       movl TSS_sysenter_sp0(%esp),%esp
 sysenter_past_esp:
        /*
         * Interrupts are disabled here, but we can't trace it until
@@ -905,7 +906,25 @@ ENTRY(simd_coprocessor_error)
        RING0_INT_FRAME
        pushl $0
        CFI_ADJUST_CFA_OFFSET 4
+#ifdef CONFIG_X86_INVD_BUG
+       /* AMD 486 bug: invd from userspace calls exception 19 instead of #GP */
+661:   pushl $do_general_protection
+662:
+.section .altinstructions,"a"
+       .balign 4
+       .long 661b
+       .long 663f
+       .byte X86_FEATURE_XMM
+       .byte 662b-661b
+       .byte 664f-663f
+.previous
+.section .altinstr_replacement,"ax"
+663:   pushl $do_simd_coprocessor_error
+664:
+.previous
+#else
        pushl $do_simd_coprocessor_error
+#endif
        CFI_ADJUST_CFA_OFFSET 4
        jmp error_code
        CFI_ENDPROC
@@ -1008,26 +1027,6 @@ ENTRY(alignment_check)
        CFI_ENDPROC
 END(alignment_check)
 
-#ifdef CONFIG_KDB
-
-ENTRY(kdb_call)
-       RING0_INT_FRAME
-       pushl %eax              # save orig EAX
-       CFI_ADJUST_CFA_OFFSET 4
-       SAVE_ALL
-       movl %esp,%ecx          # struct pt_regs
-       movl $0,%edx            # error_code
-       movl $1,%eax            # KDB_REASON_ENTER
-       call  kdb
-       jmp restore_all
-       CFI_ENDPROC
-
-#ifdef CONFIG_SMP
-BUILD_INTERRUPT(kdb_interrupt,KDB_VECTOR)
-#endif /* CONFIG_SMP */
-
-#endif /* CONFIG_KDB */
-
 ENTRY(divide_error)
        RING0_INT_FRAME
        pushl $0                        # no error code
@@ -1109,7 +1108,7 @@ ENTRY(kernel_thread_helper)
        CFI_ENDPROC
 ENDPROC(kernel_thread_helper)
 
-#ifdef CONFIG_PARAVIRT_XEN
+#ifdef CONFIG_XEN
 /* Xen doesn't set %esp to be precisely what the normal sysenter
    entrypoint expects, so fix it up before using the normal path. */
 ENTRY(xen_sysenter_target)
@@ -1202,7 +1201,7 @@ ENTRY(xen_failsafe_callback)
 .previous
 ENDPROC(xen_failsafe_callback)
 
-#endif /* CONFIG_PARAVIRT_XEN */
+#endif /* CONFIG_XEN */
 
 #ifdef CONFIG_FUNCTION_TRACER
 #ifdef CONFIG_DYNAMIC_FTRACE
@@ -1381,7 +1380,7 @@ END(page_fault)
  * that sets up the real kernel stack. Check here, since we can't
  * allow the wrong stack to be used.
  *
- * "SYSENTER_stack_sp0+12" is because the NMI/debug handler will have
+ * "TSS_sysenter_sp0+12" is because the NMI/debug handler will have
  * already pushed 3 words if it hits on the sysenter instruction:
  * eflags, cs and eip.
  *
@@ -1393,7 +1392,7 @@ END(page_fault)
        cmpw $__KERNEL_CS, 4(%esp)
        jne \ok
 \label:
-       movl SYSENTER_stack_sp0 + \offset(%esp), %esp
+       movl TSS_sysenter_sp0 + \offset(%esp), %esp
        CFI_DEF_CFA esp, 0
        CFI_UNDEFINED eip
        pushfl