x86: use generic register name in the thread and tss structures
[safe/jmp/linux-2.6] / include / asm-x86 / system_32.h
index e7e5d42..f5b3f77 100644 (file)
@@ -7,6 +7,7 @@
 #include <asm/cmpxchg.h>
 
 #ifdef __KERNEL__
+#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */
 
 struct task_struct;    /* one of the stranger aspects of C forward declarations.. */
 extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next));
@@ -27,9 +28,9 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc
                     "1:\t"                                             \
                     "popl %%ebp\n\t"                                   \
                     "popfl"                                            \
-                    :"=m" (prev->thread.esp),"=m" (prev->thread.eip),  \
+                    :"=m" (prev->thread.sp),"=m" (prev->thread.ip),    \
                      "=a" (last),"=S" (esi),"=D" (edi)                 \
-                    :"m" (next->thread.esp),"m" (next->thread.eip),    \
+                    :"m" (next->thread.sp),"m" (next->thread.ip),      \
                      "2" (prev), "d" (next));                          \
 } while (0)
 
@@ -141,7 +142,7 @@ static inline unsigned long native_read_cr4_safe(void)
 {
        unsigned long val;
        /* This could fault if %cr4 does not exist */
-       asm("1: movl %%cr4, %0          \n"
+       asm volatile("1: movl %%cr4, %0         \n"
                "2:                             \n"
                ".section __ex_table,\"a\"      \n"
                ".long 1b,2b                    \n"
@@ -160,6 +161,10 @@ static inline void native_wbinvd(void)
        asm volatile("wbinvd": : :"memory");
 }
 
+static inline void clflush(volatile void *__p)
+{
+       asm volatile("clflush %0" : "+m" (*(char __force *)__p));
+}
 
 #ifdef CONFIG_PARAVIRT
 #include <asm/paravirt.h>