aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/kernel
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-08-30 19:37:09 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-08-30 16:05:15 -0700
commit29fe5f3bafb644c33269fb0f2a719d4809a07332 (patch)
tree12bac74201557aaf93a664df04622a90626f2c8c /arch/i386/kernel
parentc05991ed12fd71e539dd8de8f5663450cd0c934c (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>
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r--arch/i386/kernel/head.S14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index eb79aa2fa8b..a6b8bd89aa2 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -317,20 +317,14 @@ is386: movl $2,%ecx # set MP
movl %eax,%gs
lldt %ax
cld # gcc2 wants the direction flag cleared at all times
+ pushl %eax # fake return address
#ifdef CONFIG_SMP
movb ready, %cl
movb $1, ready
- cmpb $0,%cl
- je 1f # the first CPU calls start_kernel
- # all other CPUs call initialize_secondary
- call initialize_secondary
- jmp L6
-1:
+ cmpb $0,%cl # the first CPU calls start_kernel
+ jne initialize_secondary # all other CPUs call initialize_secondary
#endif /* CONFIG_SMP */
- call start_kernel
-L6:
- jmp L6 # main should never return here, but
- # just in case, we know what happens.
+ jmp start_kernel
/*
* We depend on ET to be correct. This checks for 287/387.