aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 10:52:35 +0200
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 10:52:35 +0200
commit02ba1a32dbd3d406530a17a2643a8f0f8cbf3acc (patch)
tree34264fe17596eb3c83e485c26094d246e8841dac /arch/i386/kernel
parent3d08a256da8aed5300bd0752200ece426f49b050 (diff)
downloadkernel_samsung_tuna-02ba1a32dbd3d406530a17a2643a8f0f8cbf3acc.zip
kernel_samsung_tuna-02ba1a32dbd3d406530a17a2643a8f0f8cbf3acc.tar.gz
kernel_samsung_tuna-02ba1a32dbd3d406530a17a2643a8f0f8cbf3acc.tar.bz2
[PATCH] i386: move kernel_thread_helper into entry.S
And add proper CFI annotation to it which was previously impossible. This prevents "stuck" messages by the dwarf2 unwinder when reaching the top of a kernel stack. Includes feedback from Jan Beulich Cc: jbeulich@novell.com Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r--arch/i386/kernel/entry.S13
-rw-r--r--arch/i386/kernel/process.c9
2 files changed, 13 insertions, 9 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index ba22ec8..dede506 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -950,6 +950,19 @@ ENTRY(arch_unwind_init_running)
ENDPROC(arch_unwind_init_running)
#endif
+ENTRY(kernel_thread_helper)
+ pushl $0 # fake return address for unwinder
+ CFI_STARTPROC
+ movl %edx,%eax
+ push %edx
+ CFI_ADJUST_CFA_OFFSET 4
+ call *%ebx
+ push %eax
+ CFI_ADJUST_CFA_OFFSET 4
+ call do_exit
+ CFI_ENDPROC
+ENDPROC(kernel_thread_helper)
+
.section .rodata,"a"
#include "syscall_table.S"
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index b741c3e..220aeca 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -321,15 +321,6 @@ void show_regs(struct pt_regs * regs)
* the "args".
*/
extern void kernel_thread_helper(void);
-__asm__(".section .text\n"
- ".align 4\n"
- "kernel_thread_helper:\n\t"
- "movl %edx,%eax\n\t"
- "pushl %edx\n\t"
- "call *%ebx\n\t"
- "pushl %eax\n\t"
- "call do_exit\n"
- ".previous");
/*
* Create a kernel thread