diff options
-rw-r--r-- | arch/x86/entry/entry_32.S | 4 | ||||
-rw-r--r-- | arch/x86/entry/entry_64.S | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/switch_to.h | 4 |
3 files changed, 1 insertions, 10 deletions
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 10868aa734dc..c84d99bfff94 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S | |||
@@ -209,8 +209,6 @@ ENTRY(ret_from_fork) | |||
209 | call schedule_tail | 209 | call schedule_tail |
210 | GET_THREAD_INFO(%ebp) | 210 | GET_THREAD_INFO(%ebp) |
211 | popl %eax | 211 | popl %eax |
212 | pushl $0x0202 # Reset kernel eflags | ||
213 | popfl | ||
214 | 212 | ||
215 | /* When we fork, we trace the syscall return in the child, too. */ | 213 | /* When we fork, we trace the syscall return in the child, too. */ |
216 | movl %esp, %eax | 214 | movl %esp, %eax |
@@ -223,8 +221,6 @@ ENTRY(ret_from_kernel_thread) | |||
223 | call schedule_tail | 221 | call schedule_tail |
224 | GET_THREAD_INFO(%ebp) | 222 | GET_THREAD_INFO(%ebp) |
225 | popl %eax | 223 | popl %eax |
226 | pushl $0x0202 # Reset kernel eflags | ||
227 | popfl | ||
228 | movl PT_EBP(%esp), %eax | 224 | movl PT_EBP(%esp), %eax |
229 | call *PT_EBX(%esp) | 225 | call *PT_EBX(%esp) |
230 | movl $0, PT_EAX(%esp) | 226 | movl $0, PT_EAX(%esp) |
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 6344629ae1ce..9ee0da1807ed 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S | |||
@@ -372,9 +372,6 @@ END(ptregs_\func) | |||
372 | ENTRY(ret_from_fork) | 372 | ENTRY(ret_from_fork) |
373 | LOCK ; btr $TIF_FORK, TI_flags(%r8) | 373 | LOCK ; btr $TIF_FORK, TI_flags(%r8) |
374 | 374 | ||
375 | pushq $0x0002 | ||
376 | popfq /* reset kernel eflags */ | ||
377 | |||
378 | call schedule_tail /* rdi: 'prev' task parameter */ | 375 | call schedule_tail /* rdi: 'prev' task parameter */ |
379 | 376 | ||
380 | testb $3, CS(%rsp) /* from kernel_thread? */ | 377 | testb $3, CS(%rsp) /* from kernel_thread? */ |
diff --git a/arch/x86/include/asm/switch_to.h b/arch/x86/include/asm/switch_to.h index 751bf4b7bf11..8f321a1b03a1 100644 --- a/arch/x86/include/asm/switch_to.h +++ b/arch/x86/include/asm/switch_to.h | |||
@@ -39,8 +39,7 @@ do { \ | |||
39 | */ \ | 39 | */ \ |
40 | unsigned long ebx, ecx, edx, esi, edi; \ | 40 | unsigned long ebx, ecx, edx, esi, edi; \ |
41 | \ | 41 | \ |
42 | asm volatile("pushfl\n\t" /* save flags */ \ | 42 | asm volatile("pushl %%ebp\n\t" /* save EBP */ \ |
43 | "pushl %%ebp\n\t" /* save EBP */ \ | ||
44 | "movl %%esp,%[prev_sp]\n\t" /* save ESP */ \ | 43 | "movl %%esp,%[prev_sp]\n\t" /* save ESP */ \ |
45 | "movl %[next_sp],%%esp\n\t" /* restore ESP */ \ | 44 | "movl %[next_sp],%%esp\n\t" /* restore ESP */ \ |
46 | "movl $1f,%[prev_ip]\n\t" /* save EIP */ \ | 45 | "movl $1f,%[prev_ip]\n\t" /* save EIP */ \ |
@@ -49,7 +48,6 @@ do { \ | |||
49 | "jmp __switch_to\n" /* regparm call */ \ | 48 | "jmp __switch_to\n" /* regparm call */ \ |
50 | "1:\t" \ | 49 | "1:\t" \ |
51 | "popl %%ebp\n\t" /* restore EBP */ \ | 50 | "popl %%ebp\n\t" /* restore EBP */ \ |
52 | "popfl\n" /* restore flags */ \ | ||
53 | \ | 51 | \ |
54 | /* output parameters */ \ | 52 | /* output parameters */ \ |
55 | : [prev_sp] "=m" (prev->thread.sp), \ | 53 | : [prev_sp] "=m" (prev->thread.sp), \ |