Commit 29fe5f3b authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[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: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c05991ed
...@@ -317,20 +317,14 @@ is386: movl $2,%ecx # set MP ...@@ -317,20 +317,14 @@ is386: movl $2,%ecx # set MP
movl %eax,%gs movl %eax,%gs
lldt %ax lldt %ax
cld # gcc2 wants the direction flag cleared at all times cld # gcc2 wants the direction flag cleared at all times
pushl %eax # fake return address
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
movb ready, %cl movb ready, %cl
movb $1, ready movb $1, ready
cmpb $0,%cl cmpb $0,%cl # the first CPU calls start_kernel
je 1f # the first CPU calls start_kernel jne initialize_secondary # all other CPUs call initialize_secondary
# all other CPUs call initialize_secondary
call initialize_secondary
jmp L6
1:
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
call start_kernel jmp start_kernel
L6:
jmp L6 # main should never return here, but
# just in case, we know what happens.
/* /*
* We depend on ET to be correct. This checks for 287/387. * We depend on ET to be correct. This checks for 287/387.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment