diff options
Diffstat (limited to 'include/asm-x86/system.h')
-rw-r--r-- | include/asm-x86/system.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index 8a37dad38bc0..6c7d1fda4995 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h | |||
@@ -9,8 +9,14 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/irqflags.h> | 10 | #include <linux/irqflags.h> |
11 | 11 | ||
12 | /* entries in ARCH_DLINFO: */ | ||
13 | #ifdef CONFIG_IA32_EMULATION | ||
14 | # define AT_VECTOR_SIZE_ARCH 2 | ||
15 | #else | ||
16 | # define AT_VECTOR_SIZE_ARCH 1 | ||
17 | #endif | ||
18 | |||
12 | #ifdef CONFIG_X86_32 | 19 | #ifdef CONFIG_X86_32 |
13 | #define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */ | ||
14 | 20 | ||
15 | struct task_struct; /* one of the stranger aspects of C forward declarations */ | 21 | struct task_struct; /* one of the stranger aspects of C forward declarations */ |
16 | extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev, | 22 | extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev, |
@@ -56,7 +62,7 @@ extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev, | |||
56 | 62 | ||
57 | /* Save restore flags to clear handle leaking NT */ | 63 | /* Save restore flags to clear handle leaking NT */ |
58 | #define switch_to(prev, next, last) \ | 64 | #define switch_to(prev, next, last) \ |
59 | asm volatile(SAVE_CONTEXT \ | 65 | asm volatile(SAVE_CONTEXT \ |
60 | "movq %%rsp,%P[threadrsp](%[prev])\n\t" /* save RSP */ \ | 66 | "movq %%rsp,%P[threadrsp](%[prev])\n\t" /* save RSP */ \ |
61 | "movq %P[threadrsp](%[next]),%%rsp\n\t" /* restore RSP */ \ | 67 | "movq %P[threadrsp](%[next]),%%rsp\n\t" /* restore RSP */ \ |
62 | "call __switch_to\n\t" \ | 68 | "call __switch_to\n\t" \ |