entry_32.S (cc9263874b42bf98209dce0afe698b550648e770) entry_32.S (0100301bfdf56a2a370c7157b5ab0fbf9313e1cd)
1/*
2 * Copyright (C) 1991,1992 Linus Torvalds
3 *
4 * entry_32.S contains the system-call and low-level fault and trap handling routines.
5 *
6 * Stack layout while running C code:
7 * ptrace needs to have all registers on the stack.
8 * If the order here is changed, it needs to be

--- 190 unchanged lines hidden (view full) ---

199 jmp 3b
200.popsection
201 _ASM_EXTABLE(1b, 4b)
202 _ASM_EXTABLE(2b, 5b)
203 _ASM_EXTABLE(3b, 6b)
204 POP_GS_EX
205.endm
206
1/*
2 * Copyright (C) 1991,1992 Linus Torvalds
3 *
4 * entry_32.S contains the system-call and low-level fault and trap handling routines.
5 *
6 * Stack layout while running C code:
7 * ptrace needs to have all registers on the stack.
8 * If the order here is changed, it needs to be

--- 190 unchanged lines hidden (view full) ---

199 jmp 3b
200.popsection
201 _ASM_EXTABLE(1b, 4b)
202 _ASM_EXTABLE(2b, 5b)
203 _ASM_EXTABLE(3b, 6b)
204 POP_GS_EX
205.endm
206
207/*
208 * %eax: prev task
209 * %edx: next task
210 */
211ENTRY(__switch_to_asm)
212 /*
213 * Save callee-saved registers
214 * This must match the order in struct inactive_task_frame
215 */
216 pushl %ebp
217 pushl %ebx
218 pushl %edi
219 pushl %esi
220
221 /* switch stack */
222 movl %esp, TASK_threadsp(%eax)
223 movl TASK_threadsp(%edx), %esp
224
225#ifdef CONFIG_CC_STACKPROTECTOR
226 movl TASK_stack_canary(%edx), %ebx
227 movl %ebx, PER_CPU_VAR(stack_canary)+stack_canary_offset
228#endif
229
230 /* restore callee-saved registers */
231 popl %esi
232 popl %edi
233 popl %ebx
234 popl %ebp
235
236 jmp __switch_to
237END(__switch_to_asm)
238
239/*
240 * A newly forked process directly context switches into this address.
241 *
242 * eax: prev task we switched from
243 */
207ENTRY(ret_from_fork)
208 pushl %eax
209 call schedule_tail
210 popl %eax
211
212 /* When we fork, we trace the syscall return in the child, too. */
213 movl %esp, %eax
214 call syscall_return_slowpath

--- 952 unchanged lines hidden ---
244ENTRY(ret_from_fork)
245 pushl %eax
246 call schedule_tail
247 popl %eax
248
249 /* When we fork, we trace the syscall return in the child, too. */
250 movl %esp, %eax
251 call syscall_return_slowpath

--- 952 unchanged lines hidden ---