Signed-off-by: Andrew Morton --- arch/i386/kernel/entry.S | 13 +++++++++++++ arch/i386/kernel/process.c | 9 --------- 2 files changed, 13 insertions(+), 9 deletions(-) diff -puN arch/i386/kernel/entry.S~x86_64-mm-i386-kernel-thread arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S~x86_64-mm-i386-kernel-thread +++ a/arch/i386/kernel/entry.S @@ -946,6 +946,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 -puN arch/i386/kernel/process.c~x86_64-mm-i386-kernel-thread arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c~x86_64-mm-i386-kernel-thread +++ a/arch/i386/kernel/process.c @@ -325,15 +325,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 _