diff options
Diffstat (limited to 'include/asm-x86/system_32.h')
-rw-r--r-- | include/asm-x86/system_32.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/include/asm-x86/system_32.h b/include/asm-x86/system_32.h index 7da0716fb317..83af46443bd0 100644 --- a/include/asm-x86/system_32.h +++ b/include/asm-x86/system_32.h | |||
@@ -5,37 +5,6 @@ | |||
5 | #include <asm/cpufeature.h> | 5 | #include <asm/cpufeature.h> |
6 | #include <asm/cmpxchg.h> | 6 | #include <asm/cmpxchg.h> |
7 | 7 | ||
8 | #ifdef __KERNEL__ | ||
9 | #define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */ | ||
10 | |||
11 | struct task_struct; /* one of the stranger aspects of C forward declarations.. */ | ||
12 | extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next)); | ||
13 | |||
14 | /* | ||
15 | * Saving eflags is important. It switches not only IOPL between tasks, | ||
16 | * it also protects other tasks from NT leaking through sysenter etc. | ||
17 | */ | ||
18 | #define switch_to(prev,next,last) do { \ | ||
19 | unsigned long esi,edi; \ | ||
20 | asm volatile("pushfl\n\t" /* Save flags */ \ | ||
21 | "pushl %%ebp\n\t" \ | ||
22 | "movl %%esp,%0\n\t" /* save ESP */ \ | ||
23 | "movl %5,%%esp\n\t" /* restore ESP */ \ | ||
24 | "movl $1f,%1\n\t" /* save EIP */ \ | ||
25 | "pushl %6\n\t" /* restore EIP */ \ | ||
26 | "jmp __switch_to\n" \ | ||
27 | "1:\t" \ | ||
28 | "popl %%ebp\n\t" \ | ||
29 | "popfl" \ | ||
30 | :"=m" (prev->thread.sp),"=m" (prev->thread.ip), \ | ||
31 | "=a" (last),"=S" (esi),"=D" (edi) \ | ||
32 | :"m" (next->thread.sp),"m" (next->thread.ip), \ | ||
33 | "2" (prev), "d" (next)); \ | ||
34 | } while (0) | ||
35 | |||
36 | #endif /* __KERNEL__ */ | ||
37 | |||
38 | |||
39 | #include <linux/irqflags.h> | 8 | #include <linux/irqflags.h> |
40 | 9 | ||
41 | /* | 10 | /* |