x86/paravirt, 64-bit: don't restore user rsp within sysret
[safe/jmp/linux-2.6] / include / asm-x86 / irqflags.h
index 92021c1..544836c 100644 (file)
@@ -12,25 +12,21 @@ static inline unsigned long native_save_fl(void)
 {
        unsigned long flags;
 
-       __asm__ __volatile__(
-               "# __raw_save_flags\n\t"
-               "pushf ; pop %0"
-               : "=g" (flags)
-               : /* no input */
-               : "memory"
-       );
+       asm volatile("# __raw_save_flags\n\t"
+                    "pushf ; pop %0"
+                    : "=g" (flags)
+                    : /* no input */
+                    : "memory");
 
        return flags;
 }
 
 static inline void native_restore_fl(unsigned long flags)
 {
-       __asm__ __volatile__(
-               "push %0 ; popf"
-               : /* no output */
-               :"g" (flags)
-               :"memory", "cc"
-       );
+       asm volatile("push %0 ; popf"
+                    : /* no output */
+                    :"g" (flags)
+                    :"memory", "cc");
 }
 
 static inline void native_irq_disable(void)
@@ -116,13 +112,12 @@ static inline unsigned long __raw_local_irq_save(void)
 
 #ifdef CONFIG_X86_64
 #define INTERRUPT_RETURN       iretq
-#define ENABLE_INTERRUPTS_SYSCALL_RET                  \
-                       movq    %gs:pda_oldrsp, %rsp;   \
+#define USERGS_SYSRET                                  \
                        swapgs;                         \
                        sysretq;
 #else
 #define INTERRUPT_RETURN               iret
-#define ENABLE_INTERRUPTS_SYSCALL_RET  sti; sysexit
+#define ENABLE_INTERRUPTS_SYSEXIT      sti; sysexit
 #define GET_CR0_INTO_EAX               movl %cr0, %eax
 #endif
 
@@ -131,11 +126,11 @@ static inline unsigned long __raw_local_irq_save(void)
 #endif /* CONFIG_PARAVIRT */
 
 #ifndef __ASSEMBLY__
-#define raw_local_save_flags(flags) \
-               do { (flags) = __raw_local_save_flags(); } while (0)
+#define raw_local_save_flags(flags)                            \
+       do { (flags) = __raw_local_save_flags(); } while (0)
 
-#define raw_local_irq_save(flags) \
-               do { (flags) = __raw_local_irq_save(); } while (0)
+#define raw_local_irq_save(flags)                              \
+       do { (flags) = __raw_local_irq_save(); } while (0)
 
 static inline int raw_irqs_disabled_flags(unsigned long flags)
 {