diff options
author | Andi Kleen <ak@suse.de> | 2006-08-30 13:37:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-08-30 19:05:15 -0400 |
commit | 29fe5f3bafb644c33269fb0f2a719d4809a07332 (patch) | |
tree | 12bac74201557aaf93a664df04622a90626f2c8c | |
parent | c05991ed12fd71e539dd8de8f5663450cd0c934c (diff) |
[PATCH] i386: Add kernel thread stack frame termination for properly stopping stack unwinds.
One open question: Should this added push perhaps be made conditional
upon CONFIG_STACK_UNWIND or CONFIG_UNWIND_INFO?
[AK: not needed, these are all very slow paths]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/head.S | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index eb79aa2fa8bb..a6b8bd89aa27 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -317,20 +317,14 @@ is386: movl $2,%ecx # set MP | |||
317 | movl %eax,%gs | 317 | movl %eax,%gs |
318 | lldt %ax | 318 | lldt %ax |
319 | cld # gcc2 wants the direction flag cleared at all times | 319 | cld # gcc2 wants the direction flag cleared at all times |
320 | pushl %eax # fake return address | ||
320 | #ifdef CONFIG_SMP | 321 | #ifdef CONFIG_SMP |
321 | movb ready, %cl | 322 | movb ready, %cl |
322 | movb $1, ready | 323 | movb $1, ready |
323 | cmpb $0,%cl | 324 | cmpb $0,%cl # the first CPU calls start_kernel |
324 | je 1f # the first CPU calls start_kernel | 325 | jne initialize_secondary # all other CPUs call initialize_secondary |
325 | # all other CPUs call initialize_secondary | ||
326 | call initialize_secondary | ||
327 | jmp L6 | ||
328 | 1: | ||
329 | #endif /* CONFIG_SMP */ | 326 | #endif /* CONFIG_SMP */ |
330 | call start_kernel | 327 | jmp start_kernel |
331 | L6: | ||
332 | jmp L6 # main should never return here, but | ||
333 | # just in case, we know what happens. | ||
334 | 328 | ||
335 | /* | 329 | /* |
336 | * We depend on ET to be correct. This checks for 287/387. | 330 | * We depend on ET to be correct. This checks for 287/387. |